mirror of https://github.com/xemu-project/xemu.git
ui: 4:3 scale option
This commit is contained in:
parent
b8141bbfdc
commit
73813eac74
|
@ -2118,7 +2118,8 @@ static void ShowMainMenu()
|
|||
nv2a_set_surface_scale_factor(rendering_scale+1);
|
||||
}
|
||||
|
||||
if (ImGui::Combo("Scaling Mode", &scaling_mode, "Center\0Scale\0Scale (Widescreen 16:9)\0Stretch\0")) {
|
||||
if (ImGui::Combo(
|
||||
"Scaling Mode", &scaling_mode, "Center\0Scale\0Scale (Widescreen 16:9)\0Scale (4:3)\0Stretch\0")) {
|
||||
xemu_settings_set_enum(XEMU_SETTINGS_DISPLAY_SCALE, scaling_mode);
|
||||
xemu_settings_save();
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ static const struct enum_str_map display_scale_map[DISPLAY_SCALE__COUNT+1] = {
|
|||
{ DISPLAY_SCALE_CENTER, "center" },
|
||||
{ DISPLAY_SCALE_SCALE, "scale" },
|
||||
{ DISPLAY_SCALE_WS169, "scale_ws169" },
|
||||
{ DISPLAY_SCALE_FS43, "scale_fs43" },
|
||||
{ DISPLAY_SCALE_STRETCH, "stretch" },
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
|
|
@ -61,6 +61,7 @@ enum DISPLAY_SCALE
|
|||
DISPLAY_SCALE_CENTER,
|
||||
DISPLAY_SCALE_SCALE,
|
||||
DISPLAY_SCALE_WS169,
|
||||
DISPLAY_SCALE_FS43,
|
||||
DISPLAY_SCALE_STRETCH,
|
||||
DISPLAY_SCALE__COUNT,
|
||||
DISPLAY_SCALE_INVALID = -1
|
||||
|
|
|
@ -1171,6 +1171,8 @@ void sdl2_gl_refresh(DisplayChangeListener *dcl)
|
|||
if (scaling_mode == DISPLAY_SCALE_WS169) {
|
||||
// Scale to fit window using a fixed 16:9 aspect ratio
|
||||
t_ratio = 16.0f/9.0f;
|
||||
} else if (scaling_mode == DISPLAY_SCALE_FS43) {
|
||||
t_ratio = 4.0f/3.0f;
|
||||
} else {
|
||||
// Scale to fit, preserving framebuffer aspect ratio
|
||||
t_ratio = (float)tw/(float)th;
|
||||
|
|
Loading…
Reference in New Issue