mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Stop calling video_driver_context_has_windowed from within video
drivers
This commit is contained in:
parent
f6c8aba119
commit
d4756f83e5
@ -865,12 +865,6 @@ static bool ctr_suppress_screensaver(void* data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool ctr_has_windowed(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void ctr_free(void* data)
|
||||
{
|
||||
ctr_video_t* ctr = (ctr_video_t*)data;
|
||||
@ -1178,7 +1172,7 @@ video_driver_t video_ctr =
|
||||
ctr_alive,
|
||||
ctr_focus,
|
||||
ctr_suppress_screensaver,
|
||||
ctr_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
ctr_set_shader,
|
||||
ctr_free,
|
||||
"ctr",
|
||||
|
@ -917,11 +917,6 @@ static bool d3d_suppress_screensaver(void *data, bool enable)
|
||||
return video_context_driver_suppress_screensaver(&enabled);
|
||||
}
|
||||
|
||||
static bool d3d_has_windowed(void *data)
|
||||
{
|
||||
return video_context_driver_has_windowed();
|
||||
}
|
||||
|
||||
static void d3d_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
@ -1721,7 +1716,7 @@ video_driver_t video_d3d = {
|
||||
d3d_alive,
|
||||
d3d_focus,
|
||||
d3d_suppress_screensaver,
|
||||
d3d_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
d3d_set_shader,
|
||||
d3d_free,
|
||||
"d3d",
|
||||
|
@ -576,13 +576,6 @@ static bool dispmanx_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool dispmanx_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool dispmanx_gfx_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
@ -695,7 +688,7 @@ video_driver_t video_dispmanx = {
|
||||
dispmanx_gfx_alive,
|
||||
dispmanx_gfx_focus,
|
||||
dispmanx_gfx_suppress_screensaver,
|
||||
dispmanx_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
dispmanx_gfx_set_shader,
|
||||
dispmanx_gfx_free,
|
||||
"dispmanx",
|
||||
|
@ -915,13 +915,6 @@ static bool drm_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool drm_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool drm_gfx_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
@ -1018,7 +1011,7 @@ video_driver_t video_drm = {
|
||||
drm_gfx_alive,
|
||||
drm_gfx_focus,
|
||||
drm_gfx_suppress_screensaver,
|
||||
drm_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
drm_gfx_set_shader,
|
||||
drm_gfx_free,
|
||||
"drm",
|
||||
|
@ -1374,13 +1374,6 @@ static bool exynos_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool exynos_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void exynos_gfx_set_rotation(void *data, unsigned rotation)
|
||||
{
|
||||
struct exynos_video *vid = (struct exynos_video*)data;
|
||||
@ -1536,7 +1529,7 @@ video_driver_t video_exynos = {
|
||||
exynos_gfx_alive,
|
||||
exynos_gfx_focus,
|
||||
exynos_gfx_suppress_screensaver,
|
||||
exynos_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
exynos_gfx_set_shader,
|
||||
exynos_gfx_free,
|
||||
"exynos",
|
||||
|
@ -2141,11 +2141,6 @@ static bool gl_suppress_screensaver(void *data, bool enable)
|
||||
return video_context_driver_suppress_screensaver(&enabled);
|
||||
}
|
||||
|
||||
static bool gl_has_windowed(void *data)
|
||||
{
|
||||
return video_context_driver_has_windowed();
|
||||
}
|
||||
|
||||
static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
{
|
||||
video_shader_ctx_filter_t shader_filter;
|
||||
@ -2716,7 +2711,7 @@ video_driver_t video_gl = {
|
||||
gl_alive,
|
||||
gl_focus,
|
||||
gl_suppress_screensaver,
|
||||
gl_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
|
||||
gl_set_shader,
|
||||
|
||||
|
@ -1121,12 +1121,6 @@ static bool gx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool gx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gx_set_rotation(void *data, unsigned orientation)
|
||||
{
|
||||
gx_video_t *gx = (gx_video_t*)data;
|
||||
@ -1591,7 +1585,7 @@ video_driver_t video_gx = {
|
||||
gx_alive,
|
||||
gx_focus,
|
||||
gx_suppress_screensaver,
|
||||
gx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
gx_set_shader,
|
||||
gx_free,
|
||||
"gx",
|
||||
|
@ -604,12 +604,6 @@ static bool psp_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool psp_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void psp_free(void *data)
|
||||
{
|
||||
psp1_video_t *psp = (psp1_video_t*)data;
|
||||
@ -964,7 +958,7 @@ video_driver_t video_psp1 = {
|
||||
psp_alive,
|
||||
psp_focus,
|
||||
psp_suppress_screensaver,
|
||||
psp_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
psp_set_shader,
|
||||
psp_free,
|
||||
"psp1",
|
||||
|
@ -825,13 +825,6 @@ static void sunxi_gfx_set_rotation(void *data, unsigned rotation)
|
||||
(void)rotation;
|
||||
}
|
||||
|
||||
static bool sunxi_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool sunxi_gfx_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
@ -971,7 +964,7 @@ video_driver_t video_sunxi = {
|
||||
sunxi_gfx_alive,
|
||||
sunxi_gfx_focus,
|
||||
sunxi_gfx_suppress_screensaver,
|
||||
sunxi_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
sunxi_gfx_set_shader,
|
||||
sunxi_gfx_free,
|
||||
"sunxi",
|
||||
|
@ -459,11 +459,6 @@ static bool vg_suppress_screensaver(void *data, bool enable)
|
||||
return video_context_driver_suppress_screensaver(&enabled);
|
||||
}
|
||||
|
||||
static bool vg_has_windowed(void *data)
|
||||
{
|
||||
return video_context_driver_has_windowed();
|
||||
}
|
||||
|
||||
static bool vg_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
@ -509,7 +504,7 @@ video_driver_t video_vg = {
|
||||
vg_alive,
|
||||
vg_focus,
|
||||
vg_suppress_screensaver,
|
||||
vg_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
vg_set_shader,
|
||||
vg_free,
|
||||
"vg",
|
||||
|
@ -273,12 +273,6 @@ static bool vga_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool vga_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void vga_gfx_free(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -447,7 +441,7 @@ video_driver_t video_vga = {
|
||||
vga_gfx_alive,
|
||||
vga_gfx_focus,
|
||||
vga_gfx_suppress_screensaver,
|
||||
vga_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
vga_gfx_set_shader,
|
||||
vga_gfx_free,
|
||||
"vga",
|
||||
|
@ -290,12 +290,6 @@ static bool vita2d_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool vita2d_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void vita2d_gfx_free(void *data)
|
||||
{
|
||||
vita_video_t *vita = (vita_video_t *)data;
|
||||
@ -964,7 +958,7 @@ video_driver_t video_vita2d = {
|
||||
vita2d_gfx_alive,
|
||||
vita2d_gfx_focus,
|
||||
vita2d_gfx_suppress_screensaver,
|
||||
vita2d_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
vita2d_gfx_set_shader,
|
||||
vita2d_gfx_free,
|
||||
"vita2d",
|
||||
|
@ -1271,12 +1271,6 @@ static bool vulkan_suppress_screensaver(void *data, bool enable)
|
||||
return video_context_driver_suppress_screensaver(&enabled);
|
||||
}
|
||||
|
||||
static bool vulkan_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return video_context_driver_has_windowed();
|
||||
}
|
||||
|
||||
static bool vulkan_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
@ -2578,7 +2572,7 @@ video_driver_t video_vulkan = {
|
||||
vulkan_alive,
|
||||
vulkan_focus,
|
||||
vulkan_suppress_screensaver,
|
||||
vulkan_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
vulkan_set_shader,
|
||||
vulkan_free,
|
||||
"vulkan",
|
||||
|
@ -728,12 +728,6 @@ static bool wiiu_gfx_suppress_screensaver(void* data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool wiiu_gfx_has_windowed(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool wiiu_gfx_set_shader(void* data,
|
||||
enum rarch_shader_type type, const char* path)
|
||||
{
|
||||
@ -887,7 +881,7 @@ video_driver_t video_wiiu =
|
||||
wiiu_gfx_alive,
|
||||
wiiu_gfx_focus,
|
||||
wiiu_gfx_suppress_screensaver,
|
||||
wiiu_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
wiiu_gfx_set_shader,
|
||||
wiiu_gfx_free,
|
||||
"gx2",
|
||||
|
@ -271,12 +271,6 @@ static bool xenon360_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool xenon360_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void xenon360_gfx_set_rotation(void *data, unsigned rotation)
|
||||
{
|
||||
(void)data;
|
||||
@ -321,7 +315,7 @@ video_driver_t video_xenon360 = {
|
||||
xenon360_gfx_alive,
|
||||
xenon360_gfx_focus,
|
||||
xenon360_gfx_suppress_screensaver,
|
||||
xenon360_gfx_has_windowed,
|
||||
NULL, /* has_windowed */
|
||||
xenon360_gfx_set_shader,
|
||||
xenon360_gfx_free,
|
||||
"xenon360",
|
||||
|
@ -138,11 +138,6 @@ static bool xshm_gfx_suppress_screensaver(void *data, bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool xshm_gfx_has_windowed(void *data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xshm_gfx_free(void *data)
|
||||
{
|
||||
|
||||
|
@ -2903,3 +2903,16 @@ bool video_context_driver_set_flags(gfx_ctx_flags_t *flags)
|
||||
current_video_context->set_flags(video_context_data, flags->flags);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_driver_has_windowed(void)
|
||||
{
|
||||
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
|
||||
return false;
|
||||
#else
|
||||
if (current_video->has_windowed && current_video->has_windowed(video_driver_data))
|
||||
return current_video->has_windowed(video_driver_data);
|
||||
else if (video_context_data && current_video_context->has_windowed)
|
||||
return current_video_context->has_windowed(video_context_data);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
@ -521,11 +521,7 @@ extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
|
||||
|
||||
#define video_driver_is_focused() (current_video->focus(video_driver_data))
|
||||
|
||||
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
|
||||
#define video_driver_has_windowed() (false)
|
||||
#else
|
||||
#define video_driver_has_windowed() (current_video->has_windowed && current_video->has_windowed(video_driver_data))
|
||||
#endif
|
||||
bool video_driver_has_windowed(void);
|
||||
|
||||
#define video_driver_cached_frame_has_valid_framebuffer() (frame_cache_data ? (frame_cache_data == RETRO_HW_FRAME_BUFFER_VALID) : false)
|
||||
|
||||
@ -946,8 +942,6 @@ bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect);
|
||||
|
||||
bool video_context_driver_input_driver(gfx_ctx_input_t *inp);
|
||||
|
||||
#define video_context_driver_has_windowed() ((video_context_data && current_video_context->has_windowed && current_video_context->has_windowed(video_context_data)) ? true : false)
|
||||
|
||||
void video_context_driver_free(void);
|
||||
|
||||
extern const gfx_ctx_driver_t *current_video_context;
|
||||
|
Loading…
x
Reference in New Issue
Block a user