diff --git a/configuration.c b/configuration.c index e834fd26da..beaac5e7cd 100644 --- a/configuration.c +++ b/configuration.c @@ -1333,6 +1333,11 @@ static bool config_load_file(const char *path, bool set_defaults) config_get_bool(conf, "soft_filter_enable", &global->console.softfilter_enable); + CONFIG_GET_INT_BASE(conf, global, console.screen.resolutions.width, + "console_resolution_width"); + CONFIG_GET_INT_BASE(conf, global, console.screen.resolutions.height, + "console_resolution_height"); + CONFIG_GET_INT_BASE(conf, global, console.screen.flicker_filter_index, "flicker_filter_index"); CONFIG_GET_INT_BASE(conf, global, console.screen.soft_filter_index, @@ -2583,6 +2588,11 @@ bool config_save_file(const char *path) config_set_bool(conf, "flicker_filter_enable", global->console.flickerfilter_enable); + config_set_int(conf, "console_resolution_width", + global->console.screen.resolutions.width); + config_set_int(conf, "console_resolution_height", + global->console.screen.resolutions.height); + config_set_int(conf, "flicker_filter_index", global->console.screen.flicker_filter_index); config_set_int(conf, "soft_filter_index", diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 2db95b8d0b..6e7f27474b 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -427,6 +427,10 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines, video_viewport_reset_custom(); g_current_framebuf = 0; + for( int i=0; i < GX_RESOLUTIONS_LAST; i++) + if(fbWidth == menu_gx_resolutions[i][0] && lines == menu_gx_resolutions[i][1]) + menu_current_gx_resolution = i; + RARCH_LOG("GX Resolution Index: %d\n", menu_current_gx_resolution); } static void gx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) @@ -469,7 +473,8 @@ static void setup_video_mode(void *data) OSInitThreadQueue(&g_video_cond); VIDEO_GetPreferredMode(&gx_mode); - gx_set_video_mode(data, 0, 0, true); + global_t *global = global_get_ptr(); + gx_set_video_mode(data, global->console.screen.resolutions.width, global->console.screen.resolutions.height, true); } static void init_texture(void *data, unsigned width, unsigned height) @@ -1318,6 +1323,7 @@ static const video_poke_interface_t gx_poke_interface = { gx_set_video_mode, NULL, gx_get_video_output_size, + gx_get_video_output_index, gx_get_video_output_prev, gx_get_video_output_next, NULL, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d2a2045178..e91cb8a0e5 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1692,7 +1692,7 @@ static int action_ok_video_resolution(const char *path, #ifdef __CELLOS_LV2__ if (global->console.screen.resolutions.list[ - global->console.screen.resolutions.current.idx] == + global->console.screen.resolutions.current.idx] == CELL_VIDEO_OUT_RESOLUTION_576) { if (global->console.screen.pal_enable) @@ -1707,7 +1707,11 @@ static int action_ok_video_resolution(const char *path, event_command(EVENT_CMD_REINIT); #else if (video_driver_get_video_output_size(&width, &height)) + { video_driver_set_video_mode(width, height, true); + global->console.screen.resolutions.width = width; + global->console.screen.resolutions.height = height; + } #endif return 0; diff --git a/runloop.h b/runloop.h index e35e9f89e9..18a1e58af0 100644 --- a/runloop.h +++ b/runloop.h @@ -250,6 +250,8 @@ typedef struct global uint32_t *list; unsigned count; bool check; + unsigned width; + unsigned height; } resolutions; unsigned gamma_correction;