mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Create wrapper gfx_ctx_check_window
This commit is contained in:
parent
82124d6181
commit
4d3b187231
@ -2469,16 +2469,11 @@ static bool gl_alive(void *data)
|
|||||||
{
|
{
|
||||||
bool quit = false, resize = false;
|
bool quit = false, resize = false;
|
||||||
gl_t *gl = (gl_t*)data;
|
gl_t *gl = (gl_t*)data;
|
||||||
runloop_t *runloop = rarch_main_get_ptr();
|
|
||||||
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
|
||||||
|
|
||||||
if (!gl)
|
if (gfx_ctx_check_window(gl, &quit,
|
||||||
|
&resize, &gl->win_width, &gl->win_height))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ctx->check_window(gl, &quit,
|
|
||||||
&resize, &gl->win_width, &gl->win_height,
|
|
||||||
runloop->frames.video.count);
|
|
||||||
|
|
||||||
if (quit)
|
if (quit)
|
||||||
gl->quitting = true;
|
gl->quitting = true;
|
||||||
else if (resize)
|
else if (resize)
|
||||||
|
@ -82,6 +82,22 @@ const gfx_ctx_driver_t *gfx_ctx_get_ptr(void)
|
|||||||
return (const gfx_ctx_driver_t*)driver->video_context;
|
return (const gfx_ctx_driver_t*)driver->video_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool gfx_ctx_check_window(void *data, bool *quit,
|
||||||
|
bool *resize, unsigned *width, unsigned *height)
|
||||||
|
{
|
||||||
|
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
||||||
|
runloop_t *runloop = rarch_main_get_ptr();
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
ctx->check_window(data, quit, resize,
|
||||||
|
width, height,
|
||||||
|
runloop->frames.video.count);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void gfx_ctx_swap_buffers(void *data)
|
void gfx_ctx_swap_buffers(void *data)
|
||||||
{
|
{
|
||||||
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
||||||
|
@ -215,6 +215,9 @@ void gfx_ctx_swap_buffers(void *data);
|
|||||||
|
|
||||||
bool gfx_ctx_focus(void *data);
|
bool gfx_ctx_focus(void *data);
|
||||||
|
|
||||||
|
bool gfx_ctx_check_window(void *data, bool *quit,
|
||||||
|
bool *resize, unsigned *width, unsigned *height);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user