Create gfx_ctx_suppress_screensaver

This commit is contained in:
twinaphex 2015-04-10 06:13:20 +02:00
parent 7671f3e035
commit 37a5a7e653
3 changed files with 12 additions and 6 deletions

View File

@ -2484,12 +2484,7 @@ static bool gl_focus(void *data)
static bool gl_suppress_screensaver(void *data, bool enable)
{
gl_t *gl = (gl_t*)data;
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (gl && ctx)
return ctx->suppress_screensaver(gl, enable);
return false;
return gfx_ctx_suppress_screensaver(data, enable);
}
static bool gl_has_windowed(void *data)

View File

@ -177,6 +177,15 @@ bool gfx_ctx_check_window(void *data, bool *quit, bool *resize,
return true;
}
bool gfx_ctx_suppress_screensaver(void *data, bool enable)
{
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (data && ctx)
return ctx->suppress_screensaver(data, enable);
return false;
}
/**
* find_gfx_ctx_driver_index:
* @ident : Identifier of resampler driver to find.

View File

@ -224,6 +224,8 @@ bool gfx_ctx_has_windowed(void *data);
bool gfx_ctx_check_window(void *data, bool *quit, bool *resize,
unsigned *width, unsigned *height);
bool gfx_ctx_suppress_screensaver(void *data, bool enable);
retro_proc_address_t gfx_ctx_get_proc_address(const char *sym);
#ifdef __cplusplus