1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed black screen and ClipCursor issues in Mig Alley main menu

This commit is contained in:
narzoul 2023-11-25 20:05:19 +01:00
parent 70c2b78fa7
commit 10f432bf7a
2 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <Common/Hook.h>
#include <Common/Log.h>
#include <Dll/Dll.h>
#include <DDraw/RealPrimarySurface.h>
#include <Gdi/GuiThread.h>
#include <Gdi/PresentationWindow.h>
@ -44,6 +45,7 @@ namespace Gdi
{
AttachThreadInput(GetCurrentThreadId(), GetWindowThreadProcessId(owner, nullptr), FALSE);
}
DDraw::RealPrimarySurface::scheduleOverlayUpdate();
}
});
return LOG_RESULT(presentationWindow);

View File

@ -250,6 +250,7 @@ namespace
SIZE res = lpDevMode ? emulatedResolution : makeSize(currDevMode.dmPelsWidth, currDevMode.dmPelsHeight);
EnumWindows(sendDisplayChange, (res.cy << 16) | res.cx);
ClipCursor(nullptr);
SetCursorPos(currDevMode.dmPosition.x + res.cx / 2, currDevMode.dmPosition.y + res.cy / 2);
Gdi::VirtualScreen::update();