Qt: Fix desktop globalUIState -> GetUIState

This commit is contained in:
Sacha 2014-06-24 14:34:13 +00:00
parent c5e5ebe4f2
commit 6cada10e86
2 changed files with 7 additions and 6 deletions

View File

@ -51,8 +51,8 @@ inline float clamp1(float x) {
void MainWindow::newFrame()
{
if (lastUIState != globalUIState) {
lastUIState = globalUIState;
if (lastUIState != GetUIState()) {
lastUIState = GetUIState();
if (lastUIState == UISTATE_INGAME && g_Config.bFullScreen && !QApplication::overrideCursor() && !g_Config.bShowTouchControls)
QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
if (lastUIState != UISTATE_INGAME && g_Config.bFullScreen && QApplication::overrideCursor())
@ -335,7 +335,7 @@ void MainWindow::fullscrAct()
showNormal();
SetZoom(g_Config.iInternalResolution);
InitPadLayout(dp_xres, dp_yres);
if (globalUIState == UISTATE_INGAME && QApplication::overrideCursor())
if (GetUIState() == UISTATE_INGAME && QApplication::overrideCursor())
QApplication::restoreOverrideCursor();
}
else {
@ -351,7 +351,7 @@ void MainWindow::fullscrAct()
if (gpu)
gpu->Resized();
InitPadLayout(dp_xres, dp_yres);
if (globalUIState == UISTATE_INGAME && !g_Config.bShowTouchControls)
if (GetUIState() == UISTATE_INGAME && !g_Config.bShowTouchControls)
QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
}

View File

@ -9,6 +9,7 @@
#include "ConsoleListener.h"
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/System.h"
#include "Debugger/debugger_disasm.h"
#include "Debugger/debugger_memory.h"
#include "Debugger/debugger_memorytex.h"
@ -206,9 +207,9 @@ public slots:
if (_eventCheck)
setChecked(*_eventCheck);
if (_stateEnable >= 0)
setEnabled(globalUIState == _stateEnable);
setEnabled(GetUIState() == _stateEnable);
if (_stateDisable >= 0)
setEnabled(globalUIState != _stateDisable);
setEnabled(GetUIState() != _stateDisable);
if (_enableStepping && Core_IsStepping())
setEnabled(true);
}