mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 12:35:23 +00:00
New resize checking code.
This commit is contained in:
parent
d9cb85a8d5
commit
bc23b421e1
21
gfx/gl.c
21
gfx/gl.c
@ -701,25 +701,22 @@ 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
|
if (!gl->should_resize)
|
||||||
// alter the window size right after the start.
|
{
|
||||||
// We do not get any events for this it seems ...
|
unsigned new_width, new_height;
|
||||||
if (gl->frame_count == 10)
|
gfx_get_window_size(&new_width, &new_height);
|
||||||
|
if (new_width != gl->win_width || new_height != gl->win_height)
|
||||||
{
|
{
|
||||||
gl->should_resize = true;
|
gl->should_resize = true;
|
||||||
gfx_get_window_size(&gl->win_width, &gl->win_height);
|
gl->win_width = new_width;
|
||||||
SSNES_LOG("GL: Got resolution %ux%u\n", gl->win_width, gl->win_height);
|
gl->win_height = new_height;
|
||||||
|
SSNES_LOG("GL: Resize: %u x %u\n", gl->win_width, gl->win_height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user