Fixed the way how screen changes are tracked. This should fix a crash when doing an RTL from COMI when a 3x scaler is enabled.
svn-id: r35685
This commit is contained in:
parent
1d2c446395
commit
a33a5d0f14
2 changed files with 12 additions and 1 deletions
|
@ -183,7 +183,6 @@ bool OSystem_SDL::pollEvent(Common::Event &event) {
|
|||
if (_modeChanged) {
|
||||
_modeChanged = false;
|
||||
event.type = Common::EVENT_SCREEN_CHANGED;
|
||||
_screenChangeCount++;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,12 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) {
|
|||
|
||||
_videoMode.setup = true;
|
||||
_modeChanged = true;
|
||||
// OSystem_SDL::pollEvent used to update the screen change count,
|
||||
// but actually it gives problems when a video mode was changed
|
||||
// but OSystem_SDL::pollEvent was not called. This for example
|
||||
// caused a crash under certain circumstances when doing an RTL.
|
||||
// To fix this issue we update the screen change count right here.
|
||||
_screenChangeCount++;
|
||||
}
|
||||
} else if (_transactionDetails.needHotswap) {
|
||||
setGraphicsModeIntern();
|
||||
|
@ -166,6 +172,12 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) {
|
|||
} else {
|
||||
_videoMode.setup = true;
|
||||
_modeChanged = true;
|
||||
// OSystem_SDL::pollEvent used to update the screen change count,
|
||||
// but actually it gives problems when a video mode was changed
|
||||
// but OSystem_SDL::pollEvent was not called. This for example
|
||||
// caused a crash under certain circumstances when doing an RTL.
|
||||
// To fix this issue we update the screen change count right here.
|
||||
_screenChangeCount++;
|
||||
|
||||
if (_transactionDetails.needUpdatescreen)
|
||||
internUpdateScreen();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue