From b93ad3e82acbb169b18509197fc8378fcb97d037 Mon Sep 17 00:00:00 2001 From: Margen67 Date: Tue, 15 Oct 2024 22:41:58 -0700 Subject: [PATCH] [Emulator] Tie window size to resolution --- src/xenia/app/xenia_main.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc index d9f5b84b4..e74264928 100644 --- a/src/xenia/app/xenia_main.cc +++ b/src/xenia/app/xenia_main.cc @@ -449,17 +449,12 @@ bool EmulatorApp::OnInitialize() { emulator_ = std::make_unique("", storage_root, content_root, cache_root); - // Determine window size based on user widescreen setting. - uint32_t window_w = 1280; - uint32_t window_h = 720; - if (!cvars::widescreen) { - window_w = 1024; - window_h = 768; - } + // Determine window size based on user setting. + auto res = xe::gpu::GraphicsSystem::GetInternalDisplayResolution(); // Main emulator display window. emulator_window_ = EmulatorWindow::Create(emulator_.get(), app_context(), - window_w, window_h); + res.first, res.second); if (!emulator_window_) { XELOGE("Failed to create the main emulator window"); return false;