diff --git a/frontend/frontend_console.c b/frontend/frontend_console.c index 127bd77757..32c1953b04 100644 --- a/frontend/frontend_console.c +++ b/frontend/frontend_console.c @@ -272,7 +272,7 @@ begin_loop: if(g_extern.lifecycle_mode_state & (1ULL << MODE_GAME)) { driver.input->poll(NULL); - driver.video->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); + driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) audio_start_func(); diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 3da95ab049..89f3b97b89 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -694,7 +694,9 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t menu_settings_set_default(S_DEF_HW_TEXTURE_FILTER); else menu_settings_set(S_HW_TEXTURE_FILTER); - driver.video_poke->set_filtering(driver.video_data, 0, g_settings.video.smooth); + + if (driver.video_poke->set_filtering) + driver.video_poke->set_filtering(driver.video_data, 0, g_settings.video.smooth); break; #ifdef HW_RVL case RGUI_SETTINGS_VIDEO_SOFT_FILTER: @@ -763,7 +765,9 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t menu_settings_set(S_ASPECT_RATIO_DECREMENT); else if (action == RGUI_ACTION_RIGHT) menu_settings_set(S_ASPECT_RATIO_INCREMENT); - driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); + + if (driver.video_poke->set_aspect_ratio) + driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); break; case RGUI_SETTINGS_VIDEO_ROTATION: if (action == RGUI_ACTION_START) @@ -1211,7 +1215,9 @@ static int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action) { rgui_list_push(rgui->path_stack, "", type, rgui->directory_ptr); g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM; - driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); + + if (driver.video_poke->set_aspect_ratio) + driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx); } else if (type == RGUI_SETTINGS_OPEN_FILEBROWSER && action == RGUI_ACTION_OK) { diff --git a/gx/gx_video.c b/gx/gx_video.c index e0edcde101..f4b82ea77c 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -1023,6 +1023,18 @@ static bool gx_set_shader(void *data, enum rarch_shader_type type, const char *p return false; } +static const video_poke_interface_t gx_poke_interface = { + NULL, + NULL, + gx_set_aspect_ratio, +}; + +static void gx_get_poke_interface(void *data, const video_poke_interface_t **iface) +{ + (void)data; + *iface = &gx_poke_interface; +} + const video_driver_t video_gx = { .init = gx_init, .frame = gx_frame, @@ -1035,5 +1047,5 @@ const video_driver_t video_gx = { .start = gx_start, .stop = gx_stop, .restart = gx_restart, - .set_aspect_ratio = gx_set_aspect_ratio + .poke_interface = gx_get_poke_interface, };