implement wii resolution saving

This commit is contained in:
radius 2015-07-06 00:29:51 -05:00
parent 49e35a5bcf
commit d09490789a
4 changed files with 24 additions and 2 deletions

View File

@ -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",

View File

@ -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,

View File

@ -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;

View File

@ -250,6 +250,8 @@ typedef struct global
uint32_t *list;
unsigned count;
bool check;
unsigned width;
unsigned height;
} resolutions;
unsigned gamma_correction;