Support additional screen layouts.
Allows users to choose a single screen layout or a large screen layout. Adds a configuration option to change the prominent screen.
This commit is contained in:
parent
1f70365faa
commit
2b1654ad9b
16 changed files with 522 additions and 132 deletions
|
@ -72,6 +72,10 @@ void Config::ReadValues() {
|
|||
Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 1.0);
|
||||
Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 1.0);
|
||||
|
||||
// Layout
|
||||
Settings::values.layout_option = static_cast<Settings::LayoutOption>(sdl2_config->GetInteger("Layout", "layout_option", 0));
|
||||
Settings::values.swap_screen = sdl2_config->GetBoolean("Layout", "swap_screen", false);
|
||||
|
||||
// Audio
|
||||
Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto");
|
||||
Settings::values.enable_audio_stretching =
|
||||
|
|
|
@ -63,6 +63,16 @@ use_scaled_resolution =
|
|||
# 0 (default): Off, 1: On
|
||||
use_vsync =
|
||||
|
||||
[Layout]
|
||||
# Layout for the screen inside the render window.
|
||||
# 0 (default): Default Top Bottom Screen, 1: Single Screen Only, 2: Large Screen Small Screen
|
||||
layout_option =
|
||||
|
||||
# Swaps the prominent screen with the other screen.
|
||||
# For example, if Single Screen is chosen, setting this to 1 will display the bottom screen instead of the top screen.
|
||||
# 0 (default): Top Screen is prominent, 1: Bottom Screen is prominent
|
||||
swap_screen =
|
||||
|
||||
# The clear color for the renderer. What shows up on the sides of the bottom screen.
|
||||
# Must be in range of 0.0-1.0. Defaults to 1.0 for all.
|
||||
bg_red =
|
||||
|
|
|
@ -46,11 +46,8 @@ bool EmuWindow_SDL2::IsOpen() const {
|
|||
|
||||
void EmuWindow_SDL2::OnResize() {
|
||||
int width, height;
|
||||
|
||||
SDL_GetWindowSize(render_window, &width, &height);
|
||||
|
||||
NotifyFramebufferLayoutChanged(
|
||||
EmuWindow::FramebufferLayout::DefaultScreenLayout(width, height));
|
||||
UpdateCurrentFramebufferLayout(width, height);
|
||||
}
|
||||
|
||||
EmuWindow_SDL2::EmuWindow_SDL2() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue