mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
make nonexclusive= .ini settings work with direct3d 9 too
This commit is contained in:
parent
8e54756b4a
commit
c834411677
@ -312,7 +312,7 @@ static void cfg_create_ini()
|
|||||||
"; Note: Set this to a low value such as 5 or 10 if some parts of the game are not being displayed (e.g. menus or loading screens)\n"
|
"; Note: Set this to a low value such as 5 or 10 if some parts of the game are not being displayed (e.g. menus or loading screens)\n"
|
||||||
"minfps=0\n"
|
"minfps=0\n"
|
||||||
"\n"
|
"\n"
|
||||||
"; Disable fullscreen-exclusive mode for the OpenGL renderer\n"
|
"; Disable fullscreen-exclusive mode for the direct3d9/opengl renderers\n"
|
||||||
"; Note: Can be used in case some GUI elements like buttons/textboxes/videos/etc.. are invisible\n"
|
"; Note: Can be used in case some GUI elements like buttons/textboxes/videos/etc.. are invisible\n"
|
||||||
"nonexclusive=false\n"
|
"nonexclusive=false\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -43,6 +43,15 @@ BOOL d3d9_create()
|
|||||||
|
|
||||||
if (g_d3d9.hmodule)
|
if (g_d3d9.hmodule)
|
||||||
{
|
{
|
||||||
|
if (g_ddraw->nonexclusive)
|
||||||
|
{
|
||||||
|
int (WINAPI* d3d9_enable_shim)(BOOL) =
|
||||||
|
(int (WINAPI*)(BOOL))GetProcAddress(g_d3d9.hmodule, "Direct3D9EnableMaximizedWindowedModeShim");
|
||||||
|
|
||||||
|
if (d3d9_enable_shim)
|
||||||
|
d3d9_enable_shim(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
IDirect3D9 *(WINAPI *d3d_create9)(UINT) =
|
IDirect3D9 *(WINAPI *d3d_create9)(UINT) =
|
||||||
(IDirect3D9 *(WINAPI *)(UINT))GetProcAddress(g_d3d9.hmodule, "Direct3DCreate9");
|
(IDirect3D9 *(WINAPI *)(UINT))GetProcAddress(g_d3d9.hmodule, "Direct3DCreate9");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user