summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-03-25 20:41:48 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-03-25 21:10:34 +0100
commit9ff72ca9f2147ff41101d60fb806357825d5aa53 (patch)
tree8a489f13fc6c7ce90c2eaa8ce407f8c254668bcb
parentQT: Hide GLWidget immediately after showing. (diff)
downloadyuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar.gz
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar.bz2
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar.lz
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar.xz
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.tar.zst
yuzu-9ff72ca9f2147ff41101d60fb806357825d5aa53.zip
-rw-r--r--src/yuzu/bootmanager.cpp21
-rw-r--r--src/yuzu/bootmanager.h3
2 files changed, 10 insertions, 14 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index ea55e68ba..8445d9fe3 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -340,21 +340,16 @@ std::unique_ptr<Core::Frontend::GraphicsContext> GRenderWindow::CreateSharedCont
}
void GRenderWindow::InitRenderTarget() {
- if (shared_context) {
- shared_context.reset();
- }
+ shared_context.reset();
+ context.reset();
- if (context) {
- context.reset();
- }
+ delete child;
+ child = nullptr;
- if (child) {
- delete child;
- }
+ delete container;
+ container = nullptr;
- if (layout()) {
- delete layout();
- }
+ delete layout();
first_frame = false;
@@ -375,7 +370,7 @@ void GRenderWindow::InitRenderTarget() {
fmt.setSwapInterval(false);
child = new GGLWidgetInternal(this, shared_context.get());
- QWidget* container = QWidget::createWindowContainer(child, this);
+ container = QWidget::createWindowContainer(child, this);
QBoxLayout* layout = new QHBoxLayout(this);
resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index d2a440d0d..c2f2fe87e 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -166,7 +166,8 @@ private:
void OnMinimalClientAreaChangeRequest(
const std::pair<unsigned, unsigned>& minimal_size) override;
- GGLWidgetInternal* child;
+ QWidget* container = nullptr;
+ GGLWidgetInternal* child = nullptr;
QByteArray geometry;