mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Center window on current monitor during vidmode change
This commit is contained in:
parent
66dc5a8712
commit
8707b2f40a
1 changed files with 4 additions and 1 deletions
|
@ -200,7 +200,10 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||||
}
|
}
|
||||||
// Reposition window only in windowed mode
|
// Reposition window only in windowed mode
|
||||||
SDL_SetWindowSize(window, width, height);
|
SDL_SetWindowSize(window, width, height);
|
||||||
SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
SDL_SetWindowPosition(window,
|
||||||
|
SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window)),
|
||||||
|
SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue