summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu/bootmanager.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 8445d9fe3..8b4e59eb3 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -371,14 +371,23 @@ void GRenderWindow::InitRenderTarget() {
371 371
372 child = new GGLWidgetInternal(this, shared_context.get()); 372 child = new GGLWidgetInternal(this, shared_context.get());
373 container = QWidget::createWindowContainer(child, this); 373 container = QWidget::createWindowContainer(child, this);
374
374 QBoxLayout* layout = new QHBoxLayout(this); 375 QBoxLayout* layout = new QHBoxLayout(this);
376 layout->addWidget(container);
377 layout->setMargin(0);
378 setLayout(layout);
379
380 // Reset minimum size to avoid unwanted resizes when this function is called for a second time.
381 setMinimumSize(1, 1);
382
383 // Show causes the window to actually be created and the OpenGL context as well, but we don't
384 // want the widget to be shown yet, so immediately hide it.
385 show();
386 hide();
375 387
376 resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); 388 resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
377 child->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); 389 child->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
378 container->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); 390 container->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
379 layout->addWidget(container);
380 layout->setMargin(0);
381 setLayout(layout);
382 391
383 OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); 392 OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
384 393
@@ -386,10 +395,6 @@ void GRenderWindow::InitRenderTarget() {
386 NotifyClientAreaSizeChanged(std::pair<unsigned, unsigned>(child->width(), child->height())); 395 NotifyClientAreaSizeChanged(std::pair<unsigned, unsigned>(child->width(), child->height()));
387 396
388 BackupGeometry(); 397 BackupGeometry();
389 // show causes the window to actually be created and the gl context as well
390 show();
391 // but we don't want the widget to be shown yet, so immediately hide it
392 hide();
393} 398}
394 399
395void GRenderWindow::CaptureScreenshot(u16 res_scale, const QString& screenshot_path) { 400void GRenderWindow::CaptureScreenshot(u16 res_scale, const QString& screenshot_path) {