summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-12 21:22:54 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-12 21:22:54 +0100
commit6cc8c3799ac67b4831bc66b9a1738b7767a51388 (patch)
treea654134ba945bb8111df12e041ce91d1c88f3d22
parent4e9bcd3092190439f1c4aac170f0911a237ab4ed (diff)
downloadserenity-6cc8c3799ac67b4831bc66b9a1738b7767a51388.zip
Make FrameBuffer::flush() a no-op when building outside of SDL.
-rw-r--r--Widgets/FrameBuffer.cpp4
-rw-r--r--Widgets/FrameBuffer.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/Widgets/FrameBuffer.cpp b/Widgets/FrameBuffer.cpp
index 514d90abdf..7c2b4b53c4 100644
--- a/Widgets/FrameBuffer.cpp
+++ b/Widgets/FrameBuffer.cpp
@@ -90,9 +90,9 @@ RGBA32* FrameBuffer::scanline(int y)
#endif
}
+#ifdef USE_SDL
void FrameBuffer::flush()
{
-#ifdef USE_SDL
SDL_UpdateWindowSurface(m_window);
-#endif
}
+#endif
diff --git a/Widgets/FrameBuffer.h b/Widgets/FrameBuffer.h
index da00d84141..109519fba5 100644
--- a/Widgets/FrameBuffer.h
+++ b/Widgets/FrameBuffer.h
@@ -25,7 +25,11 @@ public:
RGBA32* scanline(int y);
+#ifdef USE_SDL
void flush();
+#else
+ void flush() { }
+#endif
static void initialize();