diff options
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
| -rw-r--r-- | src/citra_qt/bootmanager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index bb9b204f3..b19b367e1 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp | |||
| @@ -19,8 +19,8 @@ | |||
| 19 | #include "core/settings.h" | 19 | #include "core/settings.h" |
| 20 | #include "core/system.h" | 20 | #include "core/system.h" |
| 21 | 21 | ||
| 22 | #include "video_core/video_core.h" | ||
| 23 | #include "video_core/debug_utils/debug_utils.h" | 22 | #include "video_core/debug_utils/debug_utils.h" |
| 23 | #include "video_core/video_core.h" | ||
| 24 | 24 | ||
| 25 | #define APP_NAME "citra" | 25 | #define APP_NAME "citra" |
| 26 | #define APP_VERSION "0.1-" VERSION | 26 | #define APP_VERSION "0.1-" VERSION |
| @@ -86,6 +86,9 @@ public: | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | void paintEvent(QPaintEvent* ev) override { | 88 | void paintEvent(QPaintEvent* ev) override { |
| 89 | if (do_painting) { | ||
| 90 | QPainter painter(this); | ||
| 91 | } | ||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | void resizeEvent(QResizeEvent* ev) override { | 94 | void resizeEvent(QResizeEvent* ev) override { |
| @@ -93,8 +96,12 @@ public: | |||
| 93 | parent->OnFramebufferSizeChanged(); | 96 | parent->OnFramebufferSizeChanged(); |
| 94 | } | 97 | } |
| 95 | 98 | ||
| 99 | void DisablePainting() { do_painting = false; } | ||
| 100 | void EnablePainting() { do_painting = true; } | ||
| 101 | |||
| 96 | private: | 102 | private: |
| 97 | GRenderWindow* parent; | 103 | GRenderWindow* parent; |
| 104 | bool do_painting; | ||
| 98 | }; | 105 | }; |
| 99 | 106 | ||
| 100 | GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) : | 107 | GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) : |
| @@ -270,10 +277,12 @@ void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,un | |||
| 270 | 277 | ||
| 271 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) { | 278 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) { |
| 272 | this->emu_thread = emu_thread; | 279 | this->emu_thread = emu_thread; |
| 280 | child->DisablePainting(); | ||
| 273 | } | 281 | } |
| 274 | 282 | ||
| 275 | void GRenderWindow::OnEmulationStopping() { | 283 | void GRenderWindow::OnEmulationStopping() { |
| 276 | emu_thread = nullptr; | 284 | emu_thread = nullptr; |
| 285 | child->EnablePainting(); | ||
| 277 | } | 286 | } |
| 278 | 287 | ||
| 279 | void GRenderWindow::showEvent(QShowEvent * event) { | 288 | void GRenderWindow::showEvent(QShowEvent * event) { |