Add GFX_CTL_GET_FLAGS

This commit is contained in:
twinaphex 2016-05-05 05:49:48 +02:00
parent 8136683ffc
commit 9d225e388f
2 changed files with 16 additions and 0 deletions

View File

@ -477,6 +477,16 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
case GFX_CTL_SET_VIDEO_CONTEXT_DATA:
video_context_data = data;
break;
case GFX_CTL_GET_FLAGS:
{
gfx_ctx_flags_t *flags = (gfx_ctx_flags_t*)data;
if (!flags)
return false;
if (!current_video_context || !current_video_context->get_flags)
return false;
flags->flags = current_video_context->get_flags(video_context_data);
}
break;
case GFX_CTL_NONE:
default:
break;

View File

@ -83,6 +83,7 @@ enum gfx_ctx_ctl_state
GFX_CTL_SWAP_INTERVAL,
GFX_CTL_PROC_ADDRESS_GET,
GFX_CTL_TRANSLATE_ASPECT,
GFX_CTL_GET_FLAGS,
GFX_CTL_GET_METRICS,
GFX_CTL_INPUT_DRIVER,
GFX_CTL_SUPPRESS_SCREENSAVER,
@ -199,6 +200,11 @@ typedef struct gfx_ctx_driver
void *(*get_context_data)(void *data);
} gfx_ctx_driver_t;
typedef struct gfx_ctx_flags
{
uint32_t flags;
} gfx_ctx_flags_t;
typedef struct gfx_ctx_size
{
bool *quit;