diff options
| author | Kamil Zbróg | 2013-10-20 23:53:31 +0100 |
|---|---|---|
| committer | Kamil Zbróg | 2013-10-20 23:53:31 +0100 |
| commit | 1f0e976ea69e1e28aeb146047181eb814c0f2aef (patch) | |
| tree | 6f39d3cd4aa27cf68177c02b46811ac24f1c71c1 /gui/gui-manager.cpp | |
| parent | 852a9637119b544400984508ca20ccf47ed66a81 (diff) | |
| parent | b6bace0fa070985f5301480c36318043ef7b025e (diff) | |
| download | scummvm-rg350-1f0e976ea69e1e28aeb146047181eb814c0f2aef.tar.gz scummvm-rg350-1f0e976ea69e1e28aeb146047181eb814c0f2aef.tar.bz2 scummvm-rg350-1f0e976ea69e1e28aeb146047181eb814c0f2aef.zip | |
Merge branch 'master' into prince
Diffstat (limited to 'gui/gui-manager.cpp')
| -rw-r--r-- | gui/gui-manager.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 1505c8c707..999d61e854 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -309,6 +309,19 @@ void GuiManager::runLoop() { Common::Event event; while (eventMan->pollEvent(event)) { + // We will need to check whether the screen changed while polling + // for an event here. While we do send EVENT_SCREEN_CHANGED + // whenever this happens we still cannot be sure that we get such + // an event immediately. For example, we might have an mouse move + // event queued before an screen changed event. In some rare cases + // this would make the GUI redraw (with the code a few lines + // below) when it is not yet updated for new overlay dimensions. + // As a result ScummVM would crash because it tries to copy data + // outside the actual overlay screen. + if (event.type != Common::EVENT_SCREEN_CHANGED) { + checkScreenChange(); + } + // The top dialog can change during the event loop. In that case, flush all the // dialog-related events since they were probably generated while the old dialog // was still visible, and therefore not intended for the new one. |
