[Scummvm-git-logs] scummvm master -> c7463600c14f7d9ffd2f718405affc5e60a1fd28

mgerhardy martin.gerhardy at gmail.com
Mon Jun 21 18:57:53 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6bb711d037 GUI: removed unused prototype from EventRecorder class
c7463600c1 GUI: fixed endless recursion in EventRecorder::pollEvent


Commit: 6bb711d0375e4668634ad4aabacb92d62b5ce640
    https://github.com/scummvm/scummvm/commit/6bb711d0375e4668634ad4aabacb92d62b5ce640
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-06-21T20:50:34+02:00

Commit Message:
GUI: removed unused prototype from EventRecorder class

Changed paths:
    gui/EventRecorder.h


diff --git a/gui/EventRecorder.h b/gui/EventRecorder.h
index 01011931c9..bf8599d9a1 100644
--- a/gui/EventRecorder.h
+++ b/gui/EventRecorder.h
@@ -82,7 +82,6 @@ public:
 	bool processDelayMillis();
 	uint32 getRandomSeed(const Common::String &name);
 	void processMillis(uint32 &millis, bool skipRecord);
-	bool processAudio(uint32 &samples, bool paused);
 	void processGameDescription(const ADGameDescription *desc);
 	Common::SeekableReadStream *processSaveStream(const Common::String & fileName);
 


Commit: c7463600c14f7d9ffd2f718405affc5e60a1fd28
    https://github.com/scummvm/scummvm/commit/c7463600c14f7d9ffd2f718405affc5e60a1fd28
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-06-21T20:56:01+02:00

Commit Message:
GUI: fixed endless recursion in EventRecorder::pollEvent

warpMouse is calling purgeMouseEvents - which in turn calls pollEvents again

with this fix I was able to perform a small playback of twine in the menu

Changed paths:
    gui/EventRecorder.cpp


diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 9fdcbd3cea..bc15a37652 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -153,7 +153,6 @@ void EventRecorder::processMillis(uint32 &millis, bool skipRecord) {
 		}
 		updateSubsystems();
 		_fakeTimer = _nextEvent.time;
-		debug("millis");
 		_nextEvent = _playbackFile->getNextEvent();
 		_timerManager->handler();
 		millis = _fakeTimer;
@@ -185,7 +184,9 @@ bool EventRecorder::pollEvent(Common::Event &ev) {
 		return false;
 	}
 
-	switch (_nextEvent.type) {
+	ev = _nextEvent;
+	_nextEvent = _playbackFile->getNextEvent();
+	switch (ev.type) {
 	case Common::EVENT_MOUSEMOVE:
 	case Common::EVENT_LBUTTONDOWN:
 	case Common::EVENT_LBUTTONUP:
@@ -193,13 +194,11 @@ bool EventRecorder::pollEvent(Common::Event &ev) {
 	case Common::EVENT_RBUTTONUP:
 	case Common::EVENT_WHEELUP:
 	case Common::EVENT_WHEELDOWN:
-		g_system->warpMouse(_nextEvent.mouse.x, _nextEvent.mouse.y);
+		g_system->warpMouse(ev.mouse.x, ev.mouse.y);
 		break;
 	default:
 		break;
 	}
-	ev = _nextEvent;
-	_nextEvent = _playbackFile->getNextEvent();
 	return true;
 }
 




More information about the Scummvm-git-logs mailing list