mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Disable primary surface updates during display mode change
This commit is contained in:
parent
c81c12df84
commit
ab7271b986
@ -4,6 +4,7 @@
|
||||
#include "Common/CompatPtr.h"
|
||||
#include "Common/Hook.h"
|
||||
#include "DDraw/DirectDraw.h"
|
||||
#include "DDraw/RealPrimarySurface.h"
|
||||
#include "Win32/DisplayMode.h"
|
||||
|
||||
BOOL WINAPI DWM8And16Bit_IsShimApplied_CallOut() { return FALSE; };
|
||||
@ -52,6 +53,7 @@ namespace
|
||||
{
|
||||
prevDevMode.dmSize = sizeof(prevDevMode);
|
||||
origEnumDisplaySettingsEx(lpszDeviceName, ENUM_CURRENT_SETTINGS, &prevDevMode, 0);
|
||||
DDraw::RealPrimarySurface::disableUpdates();
|
||||
}
|
||||
|
||||
BOOL result = FALSE;
|
||||
@ -97,6 +99,11 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
if (!(dwflags & CDS_TEST))
|
||||
{
|
||||
DDraw::RealPrimarySurface::enableUpdates();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user