mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
force pos 0,0 in borderless mode
This commit is contained in:
parent
dd890feb70
commit
e39414a477
@ -127,11 +127,6 @@ void cfg_load()
|
|||||||
g_ddraw->flip_limiter.tick_length = (DWORD)(flip_len + 0.5f);
|
g_ddraw->flip_limiter.tick_length = (DWORD)(flip_len + 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g_ddraw->fullscreen = cfg_get_bool("fullscreen", FALSE)))
|
|
||||||
{
|
|
||||||
g_config.window_rect.left = g_config.window_rect.top = -32000;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cfg_get_bool("singlecpu", TRUE))
|
if (cfg_get_bool("singlecpu", TRUE))
|
||||||
{
|
{
|
||||||
SetProcessAffinityMask(GetCurrentProcess(), 1);
|
SetProcessAffinityMask(GetCurrentProcess(), 1);
|
||||||
|
5
src/dd.c
5
src/dd.c
@ -521,9 +521,6 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||||||
{
|
{
|
||||||
border = FALSE;
|
border = FALSE;
|
||||||
|
|
||||||
g_config.window_rect.left = -32000;
|
|
||||||
g_config.window_rect.top = -32000;
|
|
||||||
|
|
||||||
/* prevent OpenGL from going automatically into fullscreen exclusive mode */
|
/* prevent OpenGL from going automatically into fullscreen exclusive mode */
|
||||||
if (g_ddraw->renderer == ogl_render_main)
|
if (g_ddraw->renderer == ogl_render_main)
|
||||||
nonexclusive = TRUE;
|
nonexclusive = TRUE;
|
||||||
@ -745,7 +742,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||||||
int x = (g_config.window_rect.left != -32000) ? g_config.window_rect.left : (cy / 2) - (g_ddraw->render.width / 2);
|
int x = (g_config.window_rect.left != -32000) ? g_config.window_rect.left : (cy / 2) - (g_ddraw->render.width / 2);
|
||||||
int y = (g_config.window_rect.top != -32000) ? g_config.window_rect.top : (cx / 2) - (g_ddraw->render.height / 2);
|
int y = (g_config.window_rect.top != -32000) ? g_config.window_rect.top : (cx / 2) - (g_ddraw->render.height / 2);
|
||||||
|
|
||||||
if (nonexclusive)
|
if (g_ddraw->fullscreen)
|
||||||
{
|
{
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user