diff options
author | LittleWhite <lw.demoscene@googlemail.com> | 2015-08-26 22:04:12 +0200 |
---|---|---|
committer | LittleWhite <lw.demoscene@googlemail.com> | 2015-09-24 21:48:41 +0200 |
commit | d06824809f79b9000cdaa9e890576e9817876855 (patch) | |
tree | f213cfb94ba022259fbaeda44d098d502a5d53ad /src/citra_qt/bootmanager.cpp | |
parent | Merge pull request #1160 from lioncash/clang (diff) | |
download | yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar.gz yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar.bz2 yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar.lz yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar.xz yuzu-d06824809f79b9000cdaa9e890576e9817876855.tar.zst yuzu-d06824809f79b9000cdaa9e890576e9817876855.zip |
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 @@ #include "core/settings.h" #include "core/system.h" -#include "video_core/video_core.h" #include "video_core/debug_utils/debug_utils.h" +#include "video_core/video_core.h" #define APP_NAME "citra" #define APP_VERSION "0.1-" VERSION @@ -86,6 +86,9 @@ public: } void paintEvent(QPaintEvent* ev) override { + if (do_painting) { + QPainter painter(this); + } } void resizeEvent(QResizeEvent* ev) override { @@ -93,8 +96,12 @@ public: parent->OnFramebufferSizeChanged(); } + void DisablePainting() { do_painting = false; } + void EnablePainting() { do_painting = true; } + private: GRenderWindow* parent; + bool do_painting; }; GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) : @@ -270,10 +277,12 @@ void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,un void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) { this->emu_thread = emu_thread; + child->DisablePainting(); } void GRenderWindow::OnEmulationStopping() { emu_thread = nullptr; + child->EnablePainting(); } void GRenderWindow::showEvent(QShowEvent * event) { |