diff --git a/config.def.h b/config.def.h index 1cce99ab29..6d2014ab00 100644 --- a/config.def.h +++ b/config.def.h @@ -422,14 +422,11 @@ static const bool windowed_fullscreen = true; static const unsigned monitor_index = 0; /* Window */ -#ifdef _WIN32 /* Window size. A value of 0 uses window scale * multiplied by the core framebuffer size. */ static const unsigned window_x = 0; static const unsigned window_y = 0; -#endif - /* Fullscreen resolution. A value of 0 uses the desktop * resolution. */ static const unsigned fullscreen_x = 0; diff --git a/configuration.h b/configuration.h index 9eb1753c43..1980612f95 100644 --- a/configuration.h +++ b/configuration.h @@ -54,10 +54,8 @@ typedef struct settings char driver[32]; char context_driver[32]; float scale; -#ifdef _WIN32 unsigned window_x; unsigned window_y; -#endif bool fullscreen; bool windowed_fullscreen; unsigned monitor_index; diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 4080aae0f0..9aa0a7f6f6 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1690,6 +1690,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SSH_ENABLE, "Enable or disable remote command line access.") MSG_HASH(MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, "Prevents your system's screensaver from becoming active.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, + "Sets the window size relative to the core viewport size. Alternatively you can set a window width and height below for a fixed window size") MSG_HASH(MENU_ENUM_SUBLABEL_USER_LANGUAGE, "Sets the language of the interface.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index f473b081ca..396c62d158 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -54,6 +54,7 @@ default_sublabel_macro(action_bind_sublabel_cheevos_hardcore_mode_enable, MENU_ default_sublabel_macro(action_bind_sublabel_menu_settings_list, MENU_ENUM_SUBLABEL_MENU_SETTINGS) default_sublabel_macro(action_bind_sublabel_video_settings_list, MENU_ENUM_SUBLABEL_VIDEO_SETTINGS) default_sublabel_macro(action_bind_sublabel_suspend_screensaver_enable, MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE) +default_sublabel_macro(action_bind_sublabel_video_window_scale, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE) default_sublabel_macro(action_bind_sublabel_audio_settings_list, MENU_ENUM_SUBLABEL_AUDIO_SETTINGS) default_sublabel_macro(action_bind_sublabel_input_settings_list, MENU_ENUM_SUBLABEL_INPUT_SETTINGS) default_sublabel_macro(action_bind_sublabel_wifi_settings_list, MENU_ENUM_SUBLABEL_WIFI_SETTINGS) @@ -367,6 +368,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_suspend_screensaver_enable); break; + case MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_window_scale); + break; default: case MSG_UNKNOWN: return -1; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 5d39b8c2a9..cbff267def 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5187,14 +5187,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_VIDEO_SCALE, PARSE_ONLY_FLOAT, false); -#ifdef _WIN32 menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH, PARSE_ONLY_UINT, false); menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT, PARSE_ONLY_UINT, false); -#endif menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER, PARSE_ONLY_BOOL, false); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 4e78caa2ab..fe4c9783d5 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3330,7 +3330,6 @@ static bool setting_append_list( general_write_handler, general_read_handler); menu_settings_list_current_add_range(list, list_info, 1.0, 10.0, 1.0, true, true); -#ifdef _WIN32 CONFIG_UINT( list, list_info, &settings->video.window_x, @@ -3355,7 +3354,6 @@ static bool setting_append_list( general_write_handler, general_read_handler); menu_settings_list_current_add_range(list, list_info, 0, 4320, 8, true, true); -#endif } CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 965a0b9274..db7e111985 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -597,6 +597,7 @@ enum msg_hash_enums MENU_LABEL(VIDEO_SWAP_INTERVAL), MENU_LABEL(VIDEO_FULLSCREEN), MENU_LABEL(VIDEO_MONITOR_INDEX), + MENU_LABEL(VIDEO_WINDOW_SCALE), MENU_LABEL(VIDEO_REFRESH_RATE), MENU_LABEL(VIDEO_REFRESH_RATE_AUTO),