summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 5fdd3dab6..cc242fb2e 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -149,7 +149,7 @@ static uint MapWindowsKey(uint sym)
return key;
}
-static bool AllocateDibSection(int w, int h);
+static bool AllocateDibSection(int w, int h, bool force = false);
static void ClientSizeChanged(int w, int h)
{
@@ -690,7 +690,7 @@ static void RegisterWndClass()
}
}
-static bool AllocateDibSection(int w, int h)
+static bool AllocateDibSection(int w, int h, bool force)
{
BITMAPINFO *bi;
HDC dc;
@@ -701,7 +701,7 @@ static bool AllocateDibSection(int w, int h)
if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
- if (w == _screen.width && h == _screen.height) return false;
+ if (!force && w == _screen.width && h == _screen.height) return false;
_screen.width = w;
_screen.pitch = (bpp == 8) ? Align(w, 4) : w;
@@ -927,3 +927,8 @@ bool VideoDriver_Win32::ToggleFullscreen(bool full_screen)
{
return this->MakeWindow(full_screen);
}
+
+bool VideoDriver_Win32::AfterBlitterChange()
+{
+ return AllocateDibSection(_screen.width, _screen.height, true) && this->MakeWindow(_fullscreen);
+}