Proper 4:3 support

This commit is contained in:
NicknineTheEagle
2024-06-28 21:27:44 +03:00
committed by Radosław Gliński
parent 49166f0bd1
commit c4e930ed4c
8 changed files with 105 additions and 12 deletions

View File

@@ -103,6 +103,8 @@ DECLARE_bool(debug);
DEFINE_bool(discord, true, "Enable Discord rich presence", "General");
DECLARE_bool(widescreen);
namespace xe {
namespace app {
@@ -445,8 +447,17 @@ bool EmulatorApp::OnInitialize() {
emulator_ =
std::make_unique<Emulator>("", 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;
}
// Main emulator display window.
emulator_window_ = EmulatorWindow::Create(emulator_.get(), app_context());
emulator_window_ = EmulatorWindow::Create(emulator_.get(), app_context(),
window_w, window_h);
if (!emulator_window_) {
XELOGE("Failed to create the main emulator window");
return false;