1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

force pos 0,0 in borderless mode

This commit is contained in:
FunkyFr3sh 2023-07-03 02:59:04 +02:00
parent dd890feb70
commit e39414a477
2 changed files with 1 additions and 9 deletions

View File

@ -127,11 +127,6 @@ void cfg_load()
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))
{
SetProcessAffinityMask(GetCurrentProcess(), 1);

View File

@ -521,9 +521,6 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
{
border = FALSE;
g_config.window_rect.left = -32000;
g_config.window_rect.top = -32000;
/* prevent OpenGL from going automatically into fullscreen exclusive mode */
if (g_ddraw->renderer == ogl_render_main)
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 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;
}