mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
repurpose the old settings to the new window sizing code
This commit is contained in:
parent
4a4a6511e0
commit
c2fc35f2cc
@ -117,8 +117,8 @@ static const unsigned monitor_index = 0;
|
||||
/* Window */
|
||||
/* 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;
|
||||
static const unsigned window_width = 1280;
|
||||
static const unsigned window_height = 720;
|
||||
|
||||
/* Fullscreen resolution. A value of 0 uses the desktop
|
||||
* resolution. */
|
||||
|
@ -1590,8 +1590,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, monitor_index, false);
|
||||
SETTING_UINT("video_fullscreen_x", &settings->uints.video_fullscreen_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_fullscreen_y", &settings->uints.video_fullscreen_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_x", &settings->uints.video_window_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_window_y", &settings->uints.video_window_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_opacity", &settings->uints.video_window_opacity, true, window_opacity, false);
|
||||
#ifdef HAVE_COMMAND
|
||||
SETTING_UINT("network_cmd_port", &settings->uints.network_cmd_port, true, network_cmd_port, false);
|
||||
@ -1675,8 +1673,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_stream_scale_factor", &settings->uints.video_stream_scale_factor, true, 1, false);
|
||||
SETTING_UINT("video_windowed_position_x", &settings->uints.window_position_x, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_y", &settings->uints.window_position_y, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
|
||||
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
|
@ -373,8 +373,6 @@ typedef struct settings
|
||||
unsigned network_cmd_port;
|
||||
unsigned network_remote_base_port;
|
||||
unsigned keymapper_port;
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_window_opacity;
|
||||
unsigned crt_switch_resolution;
|
||||
unsigned crt_switch_resolution_super;
|
||||
|
@ -985,24 +985,16 @@ static bool video_driver_init_internal(bool *video_is_threaded)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->uints.video_window_x || settings->uints.video_window_y)
|
||||
if (settings->bools.video_force_aspect)
|
||||
{
|
||||
width = settings->uints.video_window_x;
|
||||
height = settings->uints.video_window_y;
|
||||
/* Do rounding here to simplify integer scale correctness. */
|
||||
unsigned base_width =
|
||||
roundf(geom->base_height * video_driver_get_aspect_ratio());
|
||||
width = roundf(base_width * settings->floats.video_scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.video_force_aspect)
|
||||
{
|
||||
/* Do rounding here to simplify integer scale correctness. */
|
||||
unsigned base_width =
|
||||
roundf(geom->base_height * video_driver_get_aspect_ratio());
|
||||
width = roundf(base_width * settings->floats.video_scale);
|
||||
}
|
||||
else
|
||||
width = roundf(geom->base_width * settings->floats.video_scale);
|
||||
height = roundf(geom->base_height * settings->floats.video_scale);
|
||||
}
|
||||
width = roundf(geom->base_width * settings->floats.video_scale);
|
||||
height = roundf(geom->base_height * settings->floats.video_scale);
|
||||
}
|
||||
|
||||
if (width && height)
|
||||
|
@ -3723,4 +3723,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -4750,4 +4750,4 @@ MSG_HASH(
|
||||
"Warning: Missing assets, use the Online Updater if available"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3501,4 +3501,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3637,4 +3637,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -7731,4 +7731,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3376,4 +3376,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -7749,4 +7749,4 @@ MSG_HASH(
|
||||
"ADVERTENCIA: Faltan recursos, use el Actualizador si está disponible"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3535,4 +3535,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3595,4 +3595,4 @@ MSG_HASH(
|
||||
"Nessun preferito disponibile."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -4044,4 +4044,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3496,4 +3496,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3382,4 +3382,4 @@ MSG_HASH(
|
||||
"Geen favorieten beschikbaar."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3798,4 +3798,4 @@ MSG_HASH(
|
||||
"Brak ulubionych."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -7781,4 +7781,4 @@ MSG_HASH(
|
||||
"Aviso: Recursos ausentes, use o Atualizador Online se disponível"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3462,4 +3462,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3665,4 +3665,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -4886,11 +4886,15 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
"Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible."
|
||||
"Set the custom width for the display window."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible."
|
||||
"Set the custom height for the display window."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember window size and position, enabling this has precedence over Windowed Scale"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
|
@ -3535,4 +3535,4 @@ MSG_HASH(
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Positions")
|
||||
"Remember Window Position and Size")
|
||||
|
@ -194,6 +194,7 @@ default_sublabel_macro(action_bind_sublabel_video_window_width, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
|
||||
default_sublabel_macro(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
|
||||
default_sublabel_macro(action_bind_sublabel_video_fullscreen_y, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y)
|
||||
default_sublabel_macro(action_bind_sublabel_video_save_window_position, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION)
|
||||
default_sublabel_macro(action_bind_sublabel_video_message_pos_x, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X)
|
||||
default_sublabel_macro(action_bind_sublabel_video_message_pos_y, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y)
|
||||
default_sublabel_macro(action_bind_sublabel_video_font_size, MENU_ENUM_SUBLABEL_VIDEO_FONT_SIZE)
|
||||
@ -1624,6 +1625,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_fullscreen_y);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_save_window_position);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_QUIT_RETROARCH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quit_retroarch);
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-Andr<EFBFBD> Santoni
|
||||
* Copyright (C) 2016-2017 - Andr<EFBFBD>s Su<EFBFBD>rez
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2016-2017 - Andrés Suárez
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -6609,12 +6609,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE,
|
||||
PARSE_ONLY_FLOAT, false);
|
||||
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);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
|
||||
PARSE_ONLY_UINT, false);
|
||||
@ -6624,6 +6618,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
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);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
@ -5457,10 +5457,10 @@ static bool setting_append_list(
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.video_window_x,
|
||||
&settings->uints.window_position_width,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH,
|
||||
0,
|
||||
window_width,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -5471,10 +5471,10 @@ static bool setting_append_list(
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.video_window_y,
|
||||
&settings->uints.window_position_height,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT,
|
||||
0,
|
||||
window_height,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
|
Loading…
Reference in New Issue
Block a user