diff --git a/DDrawCompat/Gdi/VirtualScreen.cpp b/DDrawCompat/Gdi/VirtualScreen.cpp index 2df84e4..714b8e0 100644 --- a/DDrawCompat/Gdi/VirtualScreen.cpp +++ b/DDrawCompat/Gdi/VirtualScreen.cpp @@ -264,7 +264,7 @@ namespace Gdi } else { - g_region = Region(); + g_region.clear(); EnumDisplayMonitors(nullptr, nullptr, addMonitorRectToRegion, reinterpret_cast(&g_region)); GetRgnBox(g_region, &g_bounds); } diff --git a/DDrawCompat/Gdi/Window.cpp b/DDrawCompat/Gdi/Window.cpp index 32bf343..34a0b08 100644 --- a/DDrawCompat/Gdi/Window.cpp +++ b/DDrawCompat/Gdi/Window.cpp @@ -440,7 +440,7 @@ namespace Gdi { RedrawWindow(hwnd, nullptr, it->second.invalidatedRegion, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN); - it->second.invalidatedRegion = nullptr; + it->second.invalidatedRegion.clear(); } }