mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 20:41:04 +00:00
Fix for the refresh issue when no rendering is done
This commit is contained in:
parent
bc59aaccb1
commit
f67c52a27d
@ -11,17 +11,16 @@
|
||||
#include "bootmanager.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "common/string_util.h"
|
||||
#include "common/scm_rev.h"
|
||||
#include "common/key_map.h"
|
||||
#include "common/scm_rev.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/string_util.h"
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/system.h"
|
||||
|
||||
#include "video_core/debug_utils/debug_utils.h"
|
||||
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
#include "citra_qt/version.h"
|
||||
@ -87,6 +86,9 @@ public:
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent* ev) override {
|
||||
if (do_painting) {
|
||||
QPainter painter(this);
|
||||
}
|
||||
}
|
||||
|
||||
void resizeEvent(QResizeEvent* ev) override {
|
||||
@ -94,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) :
|
||||
@ -269,8 +275,10 @@ 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();
|
||||
}
|
||||
|
@ -6,17 +6,18 @@
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
|
||||
#include <QThread>
|
||||
#include <QGLWidget>
|
||||
#include <QThread>
|
||||
|
||||
#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
|
||||
{
|
||||
@ -132,7 +133,7 @@ public slots:
|
||||
private:
|
||||
void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) override;
|
||||
|
||||
QGLWidget* child;
|
||||
GGLWidgetInternal* child;
|
||||
|
||||
QByteArray geometry;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user