mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 16:10:01 +00:00
Qt: Disable updates on xcb too
This commit is contained in:
parent
3602bb113e
commit
3b5fb57013
@ -218,7 +218,7 @@ void DisplayGL::startDrawing(std::shared_ptr<CoreController> controller) {
|
||||
CoreController::Interrupter interrupter(controller);
|
||||
QMetaObject::invokeMethod(m_painter.get(), "start");
|
||||
if (!m_gl) {
|
||||
if (QGuiApplication::platformName() == "windows") {
|
||||
if (shouldDisableUpdates()) {
|
||||
setUpdatesEnabled(false);
|
||||
}
|
||||
} else {
|
||||
@ -306,7 +306,7 @@ void DisplayGL::unpauseDrawing() {
|
||||
if (m_hasStarted) {
|
||||
m_isDrawing = true;
|
||||
QMetaObject::invokeMethod(m_painter.get(), "unpause", Qt::BlockingQueuedConnection);
|
||||
if (!m_gl && QGuiApplication::platformName() == "windows") {
|
||||
if (!m_gl && shouldDisableUpdates()) {
|
||||
setUpdatesEnabled(false);
|
||||
}
|
||||
}
|
||||
@ -385,6 +385,16 @@ void DisplayGL::resizePainter() {
|
||||
}
|
||||
}
|
||||
|
||||
bool DisplayGL::shouldDisableUpdates() {
|
||||
if (QGuiApplication::platformName() == "windows") {
|
||||
return true;
|
||||
}
|
||||
if (QGuiApplication::platformName() == "xcb") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void DisplayGL::setVideoProxy(std::shared_ptr<VideoProxy> proxy) {
|
||||
Display::setVideoProxy(proxy);
|
||||
if (proxy) {
|
||||
|
@ -112,6 +112,7 @@ protected:
|
||||
|
||||
private:
|
||||
void resizePainter();
|
||||
bool shouldDisableUpdates();
|
||||
|
||||
static QHash<QSurfaceFormat, bool> s_supports;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user