diff options
author | Willem Jan Palenstijn | 2009-02-26 12:10:11 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-02-26 12:10:11 +0000 |
commit | 1377a4b64cdeba148ba23bd10c8623a2d0a5fc8d (patch) | |
tree | 97c0a52dfdf3975e05144535aa6acae4cc9ebcea /engines/sci | |
parent | d262d7773aca3d2db91daeb12bcc18129f64f29f (diff) | |
download | scummvm-rg350-1377a4b64cdeba148ba23bd10c8623a2d0a5fc8d.tar.gz scummvm-rg350-1377a4b64cdeba148ba23bd10c8623a2d0a5fc8d.tar.bz2 scummvm-rg350-1377a4b64cdeba148ba23bd10c8623a2d0a5fc8d.zip |
Clarify behaviour of gfxop_get_event().
svn-id: r38900
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/gfx/operations.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp index 746414a9c0..9c4f1cc4c4 100644 --- a/engines/sci/gfx/operations.cpp +++ b/engines/sci/gfx/operations.cpp @@ -1473,7 +1473,7 @@ sci_event_t gfxop_get_event(gfx_state_t *state, unsigned int mask) { event = state->driver->get_event(state->driver); if (event.type) state->events.push_back(event); - } while (event.type); + } while (event.type != SCI_EVT_NONE); // Search for matching event in queue Common::List<sci_event_t>::iterator iter = state->events.begin(); @@ -1488,6 +1488,11 @@ sci_event_t gfxop_get_event(gfx_state_t *state, unsigned int mask) { if (!(mask & SCI_EVT_PEEK)) { state->events.erase(iter); } + } else { + // No event found: we must return a SCI_EVT_NONE event. + + // Because event.type is SCI_EVT_NONE already here, + // there is no need to change it. } _gfxop_full_pointer_refresh(state); |