mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-28 04:51:40 +00:00
Fix incorrect SDL window pos on high DPI
This commit is contained in:
parent
2f69079e8e
commit
136edd1097
2 changed files with 8 additions and 8 deletions
|
|
@ -95,6 +95,10 @@ static void gfx_sdl_set_mode(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_sdl_init(const char *window_title) {
|
static void gfx_sdl_init(const char *window_title) {
|
||||||
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
SetProcessDPIAware();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
|
||||||
sys_fatal("Could not init SDL1 video: %s\n", SDL_GetError());
|
sys_fatal("Could not init SDL1 video: %s\n", SDL_GetError());
|
||||||
|
|
||||||
|
|
@ -114,10 +118,6 @@ static void gfx_sdl_init(const char *window_title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
controller_bind_init();
|
controller_bind_init();
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
SetProcessDPIAware();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
|
static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,10 @@ static void gfx_sdl_reset_dimension_and_pos(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_sdl_init(const char *window_title) {
|
static void gfx_sdl_init(const char *window_title) {
|
||||||
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
SetProcessDPIAware();
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
||||||
SDL_Init(SDL_INIT_VIDEO);
|
SDL_Init(SDL_INIT_VIDEO);
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
|
|
@ -143,10 +147,6 @@ static void gfx_sdl_init(const char *window_title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
controller_bind_init();
|
controller_bind_init();
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
SetProcessDPIAware();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
|
static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue