(GX) Ifdef g_settings.vwidth with GEKKO

This commit is contained in:
twinaphex 2014-08-11 11:00:11 +02:00
parent 0998c5a203
commit f910a68083
5 changed files with 21 additions and 2 deletions

View File

@ -1099,7 +1099,9 @@ void init_video_input(void)
video.fullscreen = g_settings.video.fullscreen;
video.vsync = g_settings.video.vsync && !g_extern.system.force_nonblock;
video.force_aspect = g_settings.video.force_aspect;
#ifdef GEKKO
video.viwidth = g_settings.video.viwidth;
#endif
video.smooth = g_settings.video.smooth;
video.input_scale = scale;
video.rgb32 = g_extern.filter.filter ? g_extern.filter.out_rgb32 : (g_extern.system.pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888);

View File

@ -150,6 +150,8 @@ static void menu_common_entries_init(menu_handle_t *menu, unsigned menu_type)
file_list_push(menu->selection_buf, "", "video_shared_context", MENU_SETTINGS_VIDEO_HW_SHARED_CONTEXT, 0);
#if defined(GEKKO) || defined(__CELLOS_LV2__)
file_list_push(menu->selection_buf, "Screen Resolution", "", MENU_SETTINGS_VIDEO_RESOLUTION, 0);
#endif
#ifdef GEKKO
file_list_push(menu->selection_buf, "", "video_viwidth", MENU_SETTINGS_VIDEO_VIWIDTH, 0);
#endif
file_list_push(menu->selection_buf, "Software Filter", "", MENU_SETTINGS_VIDEO_SOFTFILTER, 0);
@ -4240,7 +4242,9 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
type_str_size);
break;
case MENU_SETTINGS_VIDEO_VIWIDTH:
#ifdef GEKKO
snprintf(type_str, type_str_size, "%d", g_settings.video.viwidth);
#endif
break;
case MENU_SETTINGS_VIDEO_SOFT_FILTER:
snprintf(type_str, type_str_size,

View File

@ -194,7 +194,9 @@ struct settings
bool black_frame_insertion;
unsigned swap_interval;
unsigned hard_sync_frames;
#ifdef GEKKO
unsigned viwidth;
#endif
bool smooth;
bool force_aspect;
bool crop_overscan;

View File

@ -303,7 +303,9 @@ void config_set_defaults(void)
g_settings.video.threaded = g_defaults.settings.video_threaded_enable;
g_settings.video.shared_context = video_shared_context;
#ifdef GEKKO
g_settings.video.viwidth = video_viwidth;
#endif
g_settings.video.smooth = video_smooth;
g_settings.video.force_aspect = force_aspect;
g_settings.video.scale_integer = scale_integer;
@ -830,7 +832,9 @@ bool config_load_file(const char *path, bool set_defaults)
g_settings.video.swap_interval = min(g_settings.video.swap_interval, 4);
CONFIG_GET_BOOL(video.threaded, "video_threaded");
CONFIG_GET_BOOL(video.shared_context, "video_shared_context");
#ifdef GEKKO
CONFIG_GET_INT(video.viwidth, "video_viwidth");
#endif
CONFIG_GET_BOOL(video.smooth, "video_smooth");
CONFIG_GET_BOOL(video.force_aspect, "video_force_aspect");
CONFIG_GET_BOOL(video.scale_integer, "video_scale_integer");
@ -1369,7 +1373,9 @@ bool config_save_file(const char *path)
config_set_float(conf, "video_yscale", g_settings.video.yscale);
config_set_bool(conf, "video_crop_overscan", g_settings.video.crop_overscan);
config_set_bool(conf, "video_scale_integer", g_settings.video.scale_integer);
#ifdef GEKKO
config_set_int(conf, "video_viwidth", g_settings.video.viwidth);
#endif
config_set_bool(conf, "video_smooth", g_settings.video.smooth);
config_set_bool(conf, "video_threaded", g_settings.video.threaded);
config_set_bool(conf, "video_shared_context", g_settings.video.shared_context);

View File

@ -796,8 +796,10 @@ static void general_read_handler(const void *data)
*setting->value.unsigned_integer = g_settings.rewind_granularity;
else if (!strcmp(setting->name, "block_sram_overwrite"))
*setting->value.boolean = g_settings.block_sram_overwrite;
#ifdef GEKKO
else if (!strcmp(setting->name, "video_viwidth"))
*setting->value.unsigned_integer = g_settings.video.viwidth;
#endif
else if (!strcmp(setting->name, "video_smooth"))
*setting->value.boolean = g_settings.video.smooth;
else if (!strcmp(setting->name, "video_monitor_index"))
@ -1064,9 +1066,11 @@ static void general_write_handler(const void *data)
else if (!strcmp(setting->name, "rewind_granularity"))
g_settings.rewind_granularity = *setting->value.unsigned_integer;
else if (!strcmp(setting->name, "block_sram_overwrite"))
g_settings.block_sram_overwrite = *setting->value.boolean
g_settings.block_sram_overwrite = *setting->value.boolean;
#ifdef GEKKO
else if (!strcmp(setting->name, "video_viwidth"))
g_settings.video.viwidth = *setting->value.unsigned_integer;
#endif
else if (!strcmp(setting->name, "video_smooth"))
{
g_settings.video.smooth = *setting->value.boolean;
@ -1581,8 +1585,9 @@ rarch_setting_t* setting_data_get_list(void)
CONFIG_INT(g_extern.console.screen.viewports.custom_vp.y, "custom_viewport_y", "Custom Viewport Y", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL)
CONFIG_UINT(g_extern.console.screen.viewports.custom_vp.width, "custom_viewport_width", "Custom Viewport Width", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL)
CONFIG_UINT(g_extern.console.screen.viewports.custom_vp.height, "custom_viewport_height", "Custom Viewport Height", 0, GROUP_NAME, SUBGROUP_NAME, NULL, NULL)
#ifdef GEKKO
CONFIG_UINT(g_settings.video.viwidth, "video_viwidth", "Set Screen Width", video_viwidth, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler)
#endif
CONFIG_BOOL(g_settings.video.smooth, "video_smooth", "Use Bilinear Filtering", video_smooth, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler)
CONFIG_UINT(g_settings.video.rotation, "video_rotation", "Rotation", 0, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_RANGE(0, 3, 1, true, true)
END_SUB_GROUP()