diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 21 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.h | 3 |
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 | |||
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | void GRenderWindow::InitRenderTarget() { | 342 | void GRenderWindow::InitRenderTarget() { |
| 343 | if (shared_context) { | 343 | shared_context.reset(); |
| 344 | shared_context.reset(); | 344 | context.reset(); |
| 345 | } | ||
| 346 | 345 | ||
| 347 | if (context) { | 346 | delete child; |
| 348 | context.reset(); | 347 | child = nullptr; |
| 349 | } | ||
| 350 | 348 | ||
| 351 | if (child) { | 349 | delete container; |
| 352 | delete child; | 350 | container = nullptr; |
| 353 | } | ||
| 354 | 351 | ||
| 355 | if (layout()) { | 352 | delete layout(); |
| 356 | delete layout(); | ||
| 357 | } | ||
| 358 | 353 | ||
| 359 | first_frame = false; | 354 | first_frame = false; |
| 360 | 355 | ||
| @@ -375,7 +370,7 @@ void GRenderWindow::InitRenderTarget() { | |||
| 375 | fmt.setSwapInterval(false); | 370 | fmt.setSwapInterval(false); |
| 376 | 371 | ||
| 377 | child = new GGLWidgetInternal(this, shared_context.get()); | 372 | child = new GGLWidgetInternal(this, shared_context.get()); |
| 378 | QWidget* container = QWidget::createWindowContainer(child, this); | 373 | container = QWidget::createWindowContainer(child, this); |
| 379 | QBoxLayout* layout = new QHBoxLayout(this); | 374 | QBoxLayout* layout = new QHBoxLayout(this); |
| 380 | 375 | ||
| 381 | resize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height); | 376 | 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: | |||
| 166 | void OnMinimalClientAreaChangeRequest( | 166 | void OnMinimalClientAreaChangeRequest( |
| 167 | const std::pair<unsigned, unsigned>& minimal_size) override; | 167 | const std::pair<unsigned, unsigned>& minimal_size) override; |
| 168 | 168 | ||
| 169 | GGLWidgetInternal* child; | 169 | QWidget* container = nullptr; |
| 170 | GGLWidgetInternal* child = nullptr; | ||
| 170 | 171 | ||
| 171 | QByteArray geometry; | 172 | QByteArray geometry; |
| 172 | 173 | ||