mirror of
https://github.com/libretro/RetroArch
synced 2025-02-25 03:40:50 +00:00
Add new possible workaround for tiling WMs ...
This commit is contained in:
parent
7d1cc23d16
commit
d9cb85a8d5
18
gfx/gl.c
18
gfx/gl.c
@ -701,10 +701,26 @@ static void check_window(gl_t *gl)
|
|||||||
gl->win_height = event.resize.h;
|
gl->win_height = event.resize.h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SDL_VIDEOEXPOSE:
|
||||||
|
gl->should_resize = true;
|
||||||
|
gfx_get_window_size(&gl->win_width, &gl->win_height);
|
||||||
|
SSNES_LOG("GL: Got resolution %ux%u\n", gl->win_width, gl->win_height);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dirty workaround to possibly fix cases where a tiling WM might asyncronously
|
||||||
|
// alter the window size right after the start.
|
||||||
|
// We do not get any events for this it seems ...
|
||||||
|
if (gl->frame_count == 10)
|
||||||
|
{
|
||||||
|
gl->should_resize = true;
|
||||||
|
gfx_get_window_size(&gl->win_width, &gl->win_height);
|
||||||
|
SSNES_LOG("GL: Got resolution %ux%u\n", gl->win_width, gl->win_height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gl_frame(void *data, const void* frame, unsigned width, unsigned height, unsigned pitch, const char *msg)
|
static bool gl_frame(void *data, const void* frame, unsigned width, unsigned height, unsigned pitch, const char *msg)
|
||||||
@ -1109,8 +1125,6 @@ static void* gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
}
|
}
|
||||||
|
|
||||||
SSNES_LOG("GL: Using resolution %ux%u\n", gl->win_width, gl->win_height);
|
SSNES_LOG("GL: Using resolution %ux%u\n", gl->win_width, gl->win_height);
|
||||||
gfx_get_window_size(&gl->win_width, &gl->win_height);
|
|
||||||
SSNES_LOG("GL: Got resolution %ux%u\n", gl->win_width, gl->win_height);
|
|
||||||
|
|
||||||
if (!gl_shader_init())
|
if (!gl_shader_init())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user