From c60bfbe2a598ae852a8bd73036f60b057bd923a0 Mon Sep 17 00:00:00 2001 From: kotn3l <32578937+kotn3l@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:39:56 +0200 Subject: [PATCH] Set game window size based on the config (in windowed mode) (#481) * Set windowed mode size based on config * fix formatting oops * emulator.cpp clang format fix (hopefully?) * formatting fix for real --- src/emulator.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/emulator.cpp b/src/emulator.cpp index 9cc7a130..37e227dd 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -34,9 +34,6 @@ Frontend::WindowSDL* g_window = nullptr; namespace Core { -static constexpr s32 WindowWidth = 1280; -static constexpr s32 WindowHeight = 720; - Emulator::Emulator() { // Read configuration file. const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); @@ -117,8 +114,8 @@ void Emulator::Run(const std::filesystem::path& file) { window_title = fmt::format("shadPS4 v{} {} | {}", Common::VERSION, Common::g_scm_desc, game_title); } - window = - std::make_unique(WindowWidth, WindowHeight, controller, window_title); + window = std::make_unique( + Config::getScreenWidth(), Config::getScreenHeight(), controller, window_title); g_window = window.get();