mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
use registry values for restoring display settings
This commit is contained in:
parent
cbd40d5c32
commit
07d0e234c9
2
ddraw.rc
2
ddraw.rc
@ -4,7 +4,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_BUILD 6
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_REVISION 2
|
||||
|
||||
#define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION
|
||||
#define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION)
|
||||
|
@ -583,7 +583,7 @@ HRESULT __stdcall ddraw_RestoreDisplayMode(IDirectDrawImpl *This)
|
||||
if(!ddraw->windowed)
|
||||
{
|
||||
if (!Direct3D9Active)
|
||||
ChangeDisplaySettings(&This->mode, 0);
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
@ -996,7 +996,7 @@ void ToggleFullscreen()
|
||||
if (Direct3D9Active)
|
||||
Direct3D9_Reset();
|
||||
else
|
||||
ChangeDisplaySettings(&ddraw->mode, ddraw->bnetActive ? CDS_FULLSCREEN : 0);
|
||||
ChangeDisplaySettings(NULL, ddraw->bnetActive ? CDS_FULLSCREEN : 0);
|
||||
|
||||
ddraw_SetDisplayMode(ddraw, ddraw->width, ddraw->height, ddraw->bpp);
|
||||
mouse_lock();
|
||||
@ -1463,7 +1463,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
if (!Direct3D9Active)
|
||||
{
|
||||
ShowWindow(ddraw->hWnd, SW_MINIMIZE);
|
||||
ChangeDisplaySettings(&ddraw->mode, ddraw->bnetActive ? CDS_FULLSCREEN : 0);
|
||||
ChangeDisplaySettings(NULL, ddraw->bnetActive ? CDS_FULLSCREEN : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1796,7 +1796,7 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
||||
}
|
||||
else if (!ddraw->windowed)
|
||||
{
|
||||
ChangeDisplaySettings(&This->mode, 0);
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ void Settings_Load()
|
||||
HookingMethod = GetInt("hook", 4);
|
||||
#endif
|
||||
|
||||
ddraw->render.maxfps = GetInt("maxfps", -1);
|
||||
ddraw->render.maxfps = GetInt("maxfps", 60);
|
||||
|
||||
if (ddraw->render.maxfps)
|
||||
ddraw->render.forcefps = GetBool("forcefps", FALSE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user