[Emulator] Tie window size to resolution
This commit is contained in:
parent
06763a9e4a
commit
b93ad3e82a
|
@ -449,17 +449,12 @@ bool EmulatorApp::OnInitialize() {
|
||||||
emulator_ =
|
emulator_ =
|
||||||
std::make_unique<Emulator>("", storage_root, content_root, cache_root);
|
std::make_unique<Emulator>("", storage_root, content_root, cache_root);
|
||||||
|
|
||||||
// Determine window size based on user widescreen setting.
|
// Determine window size based on user setting.
|
||||||
uint32_t window_w = 1280;
|
auto res = xe::gpu::GraphicsSystem::GetInternalDisplayResolution();
|
||||||
uint32_t window_h = 720;
|
|
||||||
if (!cvars::widescreen) {
|
|
||||||
window_w = 1024;
|
|
||||||
window_h = 768;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Main emulator display window.
|
// Main emulator display window.
|
||||||
emulator_window_ = EmulatorWindow::Create(emulator_.get(), app_context(),
|
emulator_window_ = EmulatorWindow::Create(emulator_.get(), app_context(),
|
||||||
window_w, window_h);
|
res.first, res.second);
|
||||||
if (!emulator_window_) {
|
if (!emulator_window_) {
|
||||||
XELOGE("Failed to create the main emulator window");
|
XELOGE("Failed to create the main emulator window");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue