From 88137521c4ae44c0682090baeee7c34de11b8862 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Feb 2015 21:37:58 +0100 Subject: [PATCH] Reimplement action_ok_video_resolution --- menu/menu_entries_cbs.c | 43 ++++++----------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/menu/menu_entries_cbs.c b/menu/menu_entries_cbs.c index 6768d8e33c..ed478986d6 100644 --- a/menu/menu_entries_cbs.c +++ b/menu/menu_entries_cbs.c @@ -2408,50 +2408,19 @@ static int action_ok_video_resolution(const char *path, static int action_toggle_video_resolution(unsigned type, const char *label, unsigned action) { -#ifdef GEKKO switch (action) { case MENU_ACTION_LEFT: - if (menu_current_gx_resolution > 0) - menu_current_gx_resolution--; + if (driver.video_data && driver.video_poke && + driver.video_poke->get_video_output_prev) + driver.video_poke->get_video_output_prev(driver.video_data); break; case MENU_ACTION_RIGHT: - if (menu_current_gx_resolution < GX_RESOLUTIONS_LAST - 1) - { -#ifdef HW_RVL - if ((menu_current_gx_resolution + 1) > GX_RESOLUTIONS_640_480) - if (CONF_GetVideo() != CONF_VIDEO_PAL) - return 0; -#endif - - menu_current_gx_resolution++; - } + if (driver.video_data && driver.video_poke && + driver.video_poke->get_video_output_next) + driver.video_poke->get_video_output_next(driver.video_data); break; } -#elif defined(__CELLOS_LV2__) - switch (action) - { - case MENU_ACTION_LEFT: - if (g_extern.console.screen.resolutions.current.idx) - { - g_extern.console.screen.resolutions.current.idx--; - g_extern.console.screen.resolutions.current.id = - g_extern.console.screen.resolutions.list - [g_extern.console.screen.resolutions.current.idx]; - } - break; - case MENU_ACTION_RIGHT: - if (g_extern.console.screen.resolutions.current.idx + 1 < - g_extern.console.screen.resolutions.count) - { - g_extern.console.screen.resolutions.current.idx++; - g_extern.console.screen.resolutions.current.id = - g_extern.console.screen.resolutions.list - [g_extern.console.screen.resolutions.current.idx]; - } - break; - } -#endif return 0; }