diff options
author | bunnei <bunneidev@gmail.com> | 2015-09-29 20:11:12 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-09-29 20:11:12 +0200 |
commit | 76baf847635f9f09cae297976efdc859e5712503 (patch) | |
tree | f213cfb94ba022259fbaeda44d098d502a5d53ad | |
parent | Merge pull request #1160 from lioncash/clang (diff) | |
parent | Fix for the refresh issue when no rendering is done (diff) | |
download | yuzu-76baf847635f9f09cae297976efdc859e5712503.tar yuzu-76baf847635f9f09cae297976efdc859e5712503.tar.gz yuzu-76baf847635f9f09cae297976efdc859e5712503.tar.bz2 yuzu-76baf847635f9f09cae297976efdc859e5712503.tar.lz yuzu-76baf847635f9f09cae297976efdc859e5712503.tar.xz yuzu-76baf847635f9f09cae297976efdc859e5712503.tar.zst yuzu-76baf847635f9f09cae297976efdc859e5712503.zip |
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 11 | ||||
-rw-r--r-- | src/citra_qt/bootmanager.h | 7 |
2 files changed, 14 insertions, 4 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) { diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index 2fd611367..0a9d263b8 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -12,11 +12,12 @@ #include "common/emu_window.h" #include "common/thread.h" -class QScreen; class QKeyEvent; +class QScreen; -class GRenderWindow; +class GGLWidgetInternal; class GMainWindow; +class GRenderWindow; class EmuThread : public QThread { @@ -137,7 +138,7 @@ signals: private: void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) override; - QGLWidget* child; + GGLWidgetInternal* child; QByteArray geometry; |