Remove video_driver_has_windowed

This commit is contained in:
twinaphex 2015-11-20 15:20:54 +01:00
parent ba4643a7c1
commit 7141210d15
7 changed files with 15 additions and 17 deletions

View File

@ -1649,7 +1649,7 @@ bool event_command(enum event_command cmd)
#endif
break;
case EVENT_CMD_FULLSCREEN_TOGGLE:
if (!video_driver_has_windowed())
if (!video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
return false;
/* If we go fullscreen we drop all drivers and

View File

@ -588,14 +588,6 @@ bool video_driver_suppress_screensaver(bool enable)
return video->suppress_screensaver(driver->video_data, enable);
}
bool video_driver_has_windowed(void)
{
driver_t *driver = driver_get_ptr();
const video_driver_t *video = video_driver_ctx_get_ptr(driver);
return video->has_windowed(driver->video_data);
}
void video_driver_set_nonblock_state(bool toggle)
{
driver_t *driver = driver_get_ptr();
@ -1199,6 +1191,13 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
{
switch (state)
{
case RARCH_DISPLAY_CTL_HAS_WINDOWED:
{
driver_t *driver = driver_get_ptr();
const video_driver_t *video = video_driver_ctx_get_ptr(driver);
return video->has_windowed(driver->video_data);
}
case RARCH_DISPLAY_CTL_GET_FRAME_COUNT:
{
uint64_t **ptr = (uint64_t**)data;

View File

@ -223,6 +223,7 @@ enum rarch_display_ctl_state
RARCH_DISPLAY_CTL_NONE = 0,
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT,
RARCH_DISPLAY_CTL_HAS_WINDOWED,
RARCH_DISPLAY_CTL_GET_FRAME_COUNT
};
@ -287,8 +288,6 @@ void uninit_video_input(void);
void init_video(void);
bool video_driver_has_windowed(void);
void video_driver_set_nonblock_state(bool toggle);
bool video_driver_set_rotation(unsigned rotation);

View File

@ -883,7 +883,7 @@ static void mui_frame(void)
mui->box_message[0] = '\0';
}
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_has_windowed()))
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL)))
{
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);

View File

@ -652,7 +652,7 @@ static void rgui_render(void)
rgui->force_redraw = true;
}
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_has_windowed()))
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL)))
rgui_blit_cursor(menu);
}

View File

@ -1822,7 +1822,7 @@ static void xmb_frame(void)
/* set alpha components of colors */
coord_color2[3] = coord_color2[7] = coord_color2[11] = coord_color2[15] = (1.00f > xmb->alpha) ? xmb->alpha : 1.00f;
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_has_windowed()))
if (settings->menu.mouse.enable && (settings->video.fullscreen || !video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL)))
{
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);

View File

@ -4018,7 +4018,7 @@ static bool setting_append_list_video_options(
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
if (video_driver_has_windowed())
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
{
CONFIG_BOOL(
&settings->video.fullscreen,
@ -4036,7 +4036,7 @@ static bool setting_append_list_video_options(
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
}
#endif
if (video_driver_has_windowed())
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
{
CONFIG_BOOL(
&settings->video.windowed_fullscreen,
@ -4228,7 +4228,7 @@ static bool setting_append_list_video_options(
START_SUB_GROUP(list, list_info, "Scaling", group_info.name, subgroup_info, parent_group);
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
if (video_driver_has_windowed())
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
{
CONFIG_FLOAT(
settings->video.scale,