mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Create gfx_ctx_check_window
This commit is contained in:
parent
33e70124a1
commit
7671f3e035
@ -2464,15 +2464,10 @@ static bool gl_alive(void *data)
|
||||
{
|
||||
bool quit = false, resize = false;
|
||||
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)
|
||||
return false;
|
||||
|
||||
ctx->check_window(gl, &quit,
|
||||
&resize, &gl->win_width, &gl->win_height,
|
||||
runloop->frames.video.count);
|
||||
if (!gfx_ctx_check_window(data, &quit,
|
||||
&resize, &gl->win_width, &gl->win_height))
|
||||
return false;
|
||||
|
||||
if (quit)
|
||||
gl->quitting = true;
|
||||
|
@ -160,6 +160,23 @@ bool gfx_ctx_has_windowed(void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfx_ctx_check_window(void *data, bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
||||
unsigned frame_count = runloop ?
|
||||
runloop->frames.video.count : 0;
|
||||
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
ctx->check_window(data, quit, resize, width, height,
|
||||
frame_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* find_gfx_ctx_driver_index:
|
||||
* @ident : Identifier of resampler driver to find.
|
||||
|
@ -221,6 +221,9 @@ void gfx_ctx_show_mouse(void *data, bool state);
|
||||
|
||||
bool gfx_ctx_has_windowed(void *data);
|
||||
|
||||
bool gfx_ctx_check_window(void *data, bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
retro_proc_address_t gfx_ctx_get_proc_address(const char *sym);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user