[Scummvm-git-logs] scummvm master -> 5803390968f932fa314eeef52d7cab59fcb3cd92
eriktorbjorn
noreply at scummvm.org
Fri Dec 17 11:33:28 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5803390968 SHERLOCK: Use a queue, not a stack, for pending key presses
Commit: 5803390968f932fa314eeef52d7cab59fcb3cd92
https://github.com/scummvm/scummvm/commit/5803390968f932fa314eeef52d7cab59fcb3cd92
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-17T12:30:57+01:00
Commit Message:
SHERLOCK: Use a queue, not a stack, for pending key presses
We want first-in-first-out, not first-in-last-out. I thought I saw
Serrated Scalpel occasionally swap the order of two keypresses for me
while entering the name of a save game, but didn't think much about it.
Where it got really noticeable was when saving in Rose Tattoo. When
erasing an old save name, once I started entering the new name it would
process the new keystrokes first, then immediately process the next
pending backspace.
Changed paths:
engines/sherlock/events.h
diff --git a/engines/sherlock/events.h b/engines/sherlock/events.h
index 711804dfdf..87e11ff5b4 100644
--- a/engines/sherlock/events.h
+++ b/engines/sherlock/events.h
@@ -25,7 +25,7 @@
#include "common/scummsys.h"
#include "common/events.h"
-#include "common/stack.h"
+#include "common/queue.h"
#include "sherlock/image_file.h"
namespace Sherlock {
@@ -61,7 +61,7 @@ public:
bool _oldButtons;
bool _oldRightButton;
bool _firstPress;
- Common::Stack<Common::KeyState> _pendingKeys;
+ Common::Queue<Common::KeyState> _pendingKeys;
Common::Point _hotspotPos;
public:
Events(SherlockEngine *vm);
More information about the Scummvm-git-logs
mailing list