mirror of
https://github.com/isledecomp/LEGOIslandRebuilder.git
synced 2024-11-27 09:35:41 -05:00
implement flip surfaces
This commit is contained in:
parent
8373301d1c
commit
cbd5b91141
3 changed files with 19 additions and 1 deletions
|
@ -31,6 +31,15 @@ DWORD WINAPI Patch()
|
||||||
dsCreateOriginal = (dsCreateFunction)OverwriteImport(dllBase, "DirectSoundCreate", (LPVOID)InterceptDirectSoundCreate);
|
dsCreateOriginal = (dsCreateFunction)OverwriteImport(dllBase, "DirectSoundCreate", (LPVOID)InterceptDirectSoundCreate);
|
||||||
dinputCreateOriginal = (dinputCreateFunction)OverwriteImport(dllBase, "DirectInputCreateA", (LPVOID)InterceptDirectInputCreateA);
|
dinputCreateOriginal = (dinputCreateFunction)OverwriteImport(dllBase, "DirectInputCreateA", (LPVOID)InterceptDirectInputCreateA);
|
||||||
|
|
||||||
|
// Flip surfaces is incompatible with full screen, if these options are set, warn the user
|
||||||
|
if (config.GetInt(_T("FlipSurfaces")) && !config.GetInt(_T("FullScreen"))) {
|
||||||
|
if (MessageBoxA(0, "The setting 'Flip Video Memory Pages' is incompatible with LEGO Island's windowed mode. "
|
||||||
|
"LEGO Island will likely fail to start up unless you disable 'Flip Video Memory Pages' "
|
||||||
|
"or run in full screen mode. Do you wish to continue?", "Warning", MB_YESNO) == IDNO) {
|
||||||
|
TerminateProcess(GetCurrentProcess(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Stay active when defocused
|
// Stay active when defocused
|
||||||
if (config.GetInt(_T("StayActiveWhenDefocused"))) {
|
if (config.GetInt(_T("StayActiveWhenDefocused"))) {
|
||||||
// Patch jump if window isn't active (TODO: Replace with C++ patch)
|
// Patch jump if window isn't active (TODO: Replace with C++ patch)
|
||||||
|
|
|
@ -181,7 +181,12 @@ LONG WINAPI InterceptRegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpR
|
||||||
|
|
||||||
} else if (!strcmp(lpValueName, "Draw Cursor")) {
|
} else if (!strcmp(lpValueName, "Draw Cursor")) {
|
||||||
|
|
||||||
ReturnRegistryYESNOFromBool(lpData, config.GetInt(_T("DrawCursor"), 1));
|
ReturnRegistryYESNOFromBool(lpData, config.GetInt(_T("DrawCursor"), 0));
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
|
} else if (!strcmp(lpValueName, "Flip Surfaces")) {
|
||||||
|
|
||||||
|
ReturnRegistryYESNOFromBool(lpData, config.GetInt(_T("FlipSurfaces"), 0));
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
} else if (!strcmp(lpValueName, "3D Device ID")) {
|
} else if (!strcmp(lpValueName, "3D Device ID")) {
|
||||||
|
|
|
@ -147,6 +147,10 @@ PatchGrid::PatchGrid()
|
||||||
_T("Renders a custom in-game cursor, rather than a standard Windows pointer."),
|
_T("Renders a custom in-game cursor, rather than a standard Windows pointer."),
|
||||||
AddBoolItem(sectionGraphics, _T("Draw Cursor"), false));
|
AddBoolItem(sectionGraphics, _T("Draw Cursor"), false));
|
||||||
|
|
||||||
|
AddPatch("FlipSurfaces",
|
||||||
|
_T(""), // FIXME: Write description for this
|
||||||
|
AddBoolItem(sectionGraphics, _T("Flip Video Memory Pages"), false));
|
||||||
|
|
||||||
vector<string> fpsList;
|
vector<string> fpsList;
|
||||||
fpsList.push_back(_T("Default"));
|
fpsList.push_back(_T("Default"));
|
||||||
fpsList.push_back(_T("Uncapped"));
|
fpsList.push_back(_T("Uncapped"));
|
||||||
|
|
Loading…
Reference in a new issue