mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 14:23:06 +00:00
Create GFX_CTL_FOCUS
This commit is contained in:
parent
fab6c9b8c4
commit
0a7c481ff0
@ -871,7 +871,7 @@ static bool d3d_alive(void *data)
|
||||
|
||||
static bool d3d_focus(void *data)
|
||||
{
|
||||
return gfx_ctx_focus();
|
||||
return gfx_ctx_ctl(GFX_CTL_FOCUS, NULL);
|
||||
}
|
||||
|
||||
static bool d3d_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -2706,7 +2706,7 @@ static bool gl_alive(void *data)
|
||||
|
||||
static bool gl_focus(void *data)
|
||||
{
|
||||
return gfx_ctx_focus();
|
||||
return gfx_ctx_ctl(GFX_CTL_FOCUS, NULL);
|
||||
}
|
||||
|
||||
static bool gl_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -379,7 +379,7 @@ static bool vg_alive(void *data)
|
||||
|
||||
static bool vg_focus(void *data)
|
||||
{
|
||||
return gfx_ctx_focus();
|
||||
return gfx_ctx_ctl(GFX_CTL_FOCUS, NULL);
|
||||
}
|
||||
|
||||
static bool vg_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -149,12 +149,6 @@ void gfx_ctx_bind_hw_render(bool enable)
|
||||
current_video_context->bind_hw_render(video_context_data, enable);
|
||||
}
|
||||
|
||||
bool gfx_ctx_focus(void)
|
||||
{
|
||||
if (!video_context_data || !current_video_context->has_focus)
|
||||
return false;
|
||||
return current_video_context->has_focus(video_context_data);
|
||||
}
|
||||
|
||||
bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
@ -439,6 +433,10 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case GFX_CTL_FOCUS:
|
||||
if (!video_context_data || !current_video_context->has_focus)
|
||||
return false;
|
||||
return current_video_context->has_focus(video_context_data);
|
||||
case GFX_CTL_FREE:
|
||||
if (current_video_context->destroy)
|
||||
current_video_context->destroy(video_context_data);
|
||||
|
@ -54,6 +54,7 @@ enum display_metric_types
|
||||
enum gfx_ctx_ctl_state
|
||||
{
|
||||
GFX_CTL_NONE = 0,
|
||||
GFX_CTL_FOCUS,
|
||||
GFX_CTL_FREE
|
||||
};
|
||||
|
||||
@ -214,8 +215,6 @@ bool gfx_ctx_set_video_mode(unsigned width, unsigned height,
|
||||
|
||||
void gfx_ctx_swap_buffers(void);
|
||||
|
||||
bool gfx_ctx_focus(void);
|
||||
|
||||
bool gfx_ctx_image_buffer_init(const video_info_t *info);
|
||||
|
||||
bool gfx_ctx_image_buffer_write(const void *frame,
|
||||
|
Loading…
x
Reference in New Issue
Block a user