diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-03-25 20:46:30 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-03-25 21:10:34 +0100 |
commit | bbb396d7f1e4bd28fdd921af91b766d4504e5f4a (patch) | |
tree | f0d3f360690053d4457825722f68525aad85df09 /src | |
parent | bootmanager: Delete container to avoid crash on game restarting (diff) | |
download | yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar.gz yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar.bz2 yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar.lz yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar.xz yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.tar.zst yuzu-bbb396d7f1e4bd28fdd921af91b766d4504e5f4a.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 19 |
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() { child = new GGLWidgetInternal(this, shared_context.get()); container = QWidget::createWindowContainer(child, this); + QBoxLayout* layout = new QHBoxLayout(this); + layout->addWidget(container); + layout->setMargin(0); + setLayout(layout); + + // Reset minimum size to avoid unwanted resizes when this function is called for a second time. + setMinimumSize(1, 1); + + // Show causes the window to actually be created and the OpenGL context as well, but we don't + // want the widget to be shown yet, so immediately hide it. + show(); + hide(); resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); child->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); container->resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); - layout->addWidget(container); - layout->setMargin(0); - setLayout(layout); OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); @@ -386,10 +395,6 @@ void GRenderWindow::InitRenderTarget() { NotifyClientAreaSizeChanged(std::pair<unsigned, unsigned>(child->width(), child->height())); BackupGeometry(); - // show causes the window to actually be created and the gl context as well - show(); - // but we don't want the widget to be shown yet, so immediately hide it - hide(); } void GRenderWindow::CaptureScreenshot(u16 res_scale, const QString& screenshot_path) { |