[Scummvm-git-logs] scummvm master -> a72296be87cd3a3f549545f3aec50f7273098da1
sev-
noreply at scummvm.org
Wed Apr 24 23:05:50 UTC 2024
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:
a72296be87 COMMON: clear mappedEvents list only if empty
Commit: a72296be87cd3a3f549545f3aec50f7273098da1
https://github.com/scummvm/scummvm/commit/a72296be87cd3a3f549545f3aec50f7273098da1
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-04-25T01:05:46+02:00
Commit Message:
COMMON: clear mappedEvents list only if empty
Changed paths:
common/events.cpp
diff --git a/common/events.cpp b/common/events.cpp
index 5874a5cdcdd..64f733a581b 100644
--- a/common/events.cpp
+++ b/common/events.cpp
@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
#include "common/events.h"
#include "common/system.h"
@@ -92,7 +91,9 @@ void EventDispatcher::dispatch() {
assert(event.type != EVENT_CUSTOM_ENGINE_ACTION_END);
for (List<MapperEntry>::iterator m = _mappers.begin(); m != _mappers.end(); ++m) {
- mappedEvents.clear();
+ if (!mappedEvents.empty())
+ mappedEvents.clear();
+
if (!m->mapper->mapEvent(event, mappedEvents))
continue;
More information about the Scummvm-git-logs
mailing list