mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-30 19:50:24 +00:00
Add GFX_CTL_HAS_WINDOWED
This commit is contained in:
parent
752e9abd4e
commit
f079ca29e4
@ -881,7 +881,7 @@ static bool d3d_suppress_screensaver(void *data, bool enable)
|
||||
|
||||
static bool d3d_has_windowed(void *data)
|
||||
{
|
||||
return gfx_ctx_has_windowed();
|
||||
return gfx_ctx_ctl(GFX_CTL_HAS_WINDOWED, NULL);
|
||||
}
|
||||
|
||||
static void d3d_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
|
@ -2716,7 +2716,7 @@ static bool gl_suppress_screensaver(void *data, bool enable)
|
||||
|
||||
static bool gl_has_windowed(void *data)
|
||||
{
|
||||
return gfx_ctx_has_windowed();
|
||||
return gfx_ctx_ctl(GFX_CTL_HAS_WINDOWED, NULL);
|
||||
}
|
||||
|
||||
static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
|
@ -389,7 +389,7 @@ static bool vg_suppress_screensaver(void *data, bool enable)
|
||||
|
||||
static bool vg_has_windowed(void *data)
|
||||
{
|
||||
return gfx_ctx_has_windowed();
|
||||
return gfx_ctx_ctl(GFX_CTL_HAS_WINDOWED, NULL);
|
||||
}
|
||||
|
||||
static bool vg_set_shader(void *data,
|
||||
|
@ -200,13 +200,6 @@ void gfx_ctx_show_mouse(bool state)
|
||||
current_video_context->show_mouse(video_context_data, state);
|
||||
}
|
||||
|
||||
bool gfx_ctx_has_windowed(void)
|
||||
{
|
||||
if (!video_context_data)
|
||||
return false;
|
||||
return current_video_context->has_windowed(video_context_data);
|
||||
}
|
||||
|
||||
bool gfx_ctx_check_window(bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@ -434,6 +427,10 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
|
||||
if (!video_context_data || !current_video_context->has_focus)
|
||||
return false;
|
||||
return current_video_context->has_focus(video_context_data);
|
||||
case GFX_CTL_HAS_WINDOWED:
|
||||
if (!video_context_data)
|
||||
return false;
|
||||
return current_video_context->has_windowed(video_context_data);
|
||||
case GFX_CTL_FREE:
|
||||
if (current_video_context->destroy)
|
||||
current_video_context->destroy(video_context_data);
|
||||
|
@ -56,7 +56,8 @@ enum gfx_ctx_ctl_state
|
||||
GFX_CTL_NONE = 0,
|
||||
GFX_CTL_FOCUS,
|
||||
GFX_CTL_FREE,
|
||||
GFX_CTL_SWAP_BUFFERS
|
||||
GFX_CTL_SWAP_BUFFERS,
|
||||
GFX_CTL_HAS_WINDOWED
|
||||
};
|
||||
|
||||
typedef void (*gfx_ctx_proc_t)(void);
|
||||
@ -222,8 +223,6 @@ bool gfx_ctx_image_buffer_write(const void *frame,
|
||||
|
||||
void gfx_ctx_show_mouse(bool state);
|
||||
|
||||
bool gfx_ctx_has_windowed(void);
|
||||
|
||||
bool gfx_ctx_check_window(bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user