mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
OPENGL: Cleanup switchDisplayMode.
This commit is contained in:
parent
f490e6f361
commit
8d35d91bdf
@ -1376,19 +1376,19 @@ const char *OpenGLGraphicsManager::getCurrentModeName() {
|
||||
}
|
||||
|
||||
void OpenGLGraphicsManager::switchDisplayMode(int mode) {
|
||||
if (_oldVideoMode.setup && _oldVideoMode.mode == mode)
|
||||
assert(_transactionMode == kTransactionActive);
|
||||
|
||||
if (_videoMode.mode == mode)
|
||||
return;
|
||||
|
||||
if (_transactionMode == kTransactionActive) {
|
||||
if (mode == -1) // If -1, switch to next mode
|
||||
_videoMode.mode = (_videoMode.mode + 1) % 4;
|
||||
else if (mode == -2) // If -2, switch to previous mode
|
||||
_videoMode.mode = (_videoMode.mode + 3) % 4;
|
||||
else
|
||||
_videoMode.mode = mode;
|
||||
if (mode == -1) // If -1, switch to next mode
|
||||
_videoMode.mode = (_videoMode.mode + 1) % 4;
|
||||
else if (mode == -2) // If -2, switch to previous mode
|
||||
_videoMode.mode = (_videoMode.mode + 3) % 4;
|
||||
else
|
||||
_videoMode.mode = mode;
|
||||
|
||||
_transactionDetails.needRefresh = true;
|
||||
}
|
||||
_transactionDetails.needRefresh = true;
|
||||
}
|
||||
|
||||
#ifdef USE_OSD
|
||||
|
@ -219,7 +219,10 @@ protected:
|
||||
|
||||
/**
|
||||
* Sets the dispaly mode.
|
||||
* @mode the dispaly mode, if -1 it will switch to next mode. If -2 to previous mode.
|
||||
*
|
||||
* This can only be used in a GFX transaction.
|
||||
*
|
||||
* @param mode the dispaly mode, if -1 it will switch to next mode. If -2 to previous mode.
|
||||
*/
|
||||
virtual void switchDisplayMode(int mode);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user