1
0
mirror of synced 2025-01-20 09:42:49 +01:00

- Exboard games: fix test menu saving, fullscreen hack

- Exboard games: fix test menu saving, add fullscreen workaround
This commit is contained in:
Nezarn 2020-04-30 22:07:58 +02:00
parent 08ebd6966d
commit 7fdfe40873
2 changed files with 15 additions and 3 deletions

View File

@ -71,6 +71,7 @@ DWORD process_streamExBoard(UINT8 *stream, DWORD srcsize, BYTE *dst, DWORD dstsi
//logmsg("SRAM WRITE %d : %x\n", size, addr);
memcpy(&SRAM[addr], &stream[6], size);
SRAM_save();
break;
}
@ -318,10 +319,17 @@ int __stdcall GetKeyLicenseWrap(void)
return 1;
}
LONG __stdcall ChangeDisplaySettingsWrap(DEVMODE *lpDevMode, DWORD dwflags)
LONG __stdcall ChangeDisplaySettingsAWrap(DEVMODEA *lpDevMode, DWORD dwflags)
{
if (ToBool(config["General"]["Windowed"]))
{
return DISP_CHANGE_SUCCESSFUL;
}
lpDevMode->dmBitsPerPel = 32;
lpDevMode->dmDisplayFrequency = 60;
return ChangeDisplaySettingsA(lpDevMode, dwflags);
}
BOOL __stdcall ExitWindowsExWrap(UINT uFlags, DWORD dwReason)
{
@ -429,7 +437,7 @@ static InitFunction ExBoardGenericFunc([]()
iatHook("kernel32.dll", GetCommModemStatusWrapExBoard, "GetCommModemStatus");
iatHook("kernel32.dll", CloseHandleWrapExBoard, "CloseHandle");
iatHook("IpgExKey.dll", GetKeyLicenseWrap, "_GetKeyLicense@0");
iatHook("user32.dll", ChangeDisplaySettingsWrap, "ChangeDisplaySettingsA");
iatHook("user32.dll", ChangeDisplaySettingsAWrap, "ChangeDisplaySettingsA");
iatHook("user32.dll", ExitWindowsExWrap, "ExitWindowsEx");
iatHook("user32.dll", GetAsyncKeyStateWrap, "GetAsyncKeyState");
iatHook("user32.dll", SetWindowPosWrap, "SetWindowPos");

View File

@ -59,6 +59,10 @@ DWORD WINAPI QuitGameThread(__in LPVOID lpParameter)
{
FreeLibrary(blaster);
}
if (GameDetect::currentGame == GameID::ExBoardGeneric || !ToBool(config["General"]["Windowed"]))
{
ChangeDisplaySettingsA(NULL, 0);
}
TerminateProcess(GetCurrentProcess(), 0);
#endif
//ExitProcess(0);