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
This commit is contained in:
kotn3l 2024-08-20 14:39:56 +02:00 committed by GitHub
parent 95c89ca6a9
commit c60bfbe2a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

View File

@ -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<Frontend::WindowSDL>(WindowWidth, WindowHeight, controller, window_title);
window = std::make_unique<Frontend::WindowSDL>(
Config::getScreenWidth(), Config::getScreenHeight(), controller, window_title);
g_window = window.get();