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

dreammaster noreply at scummvm.org
Sat Apr 1 18:17:47 UTC 2023


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:
c8f42d44bc NUVIE: Fix Ultima 6 failed assert on resting


Commit: c8f42d44bc947f6dc49db7c5eeecf8c3b0853ee5
    https://github.com/scummvm/scummvm/commit/c8f42d44bc947f6dc49db7c5eeecf8c3b0853ee5
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-04-01T11:17:42-07:00

Commit Message:
NUVIE: Fix Ultima 6 failed assert on resting

Fix failed assertion when starting the "rest" action
and holding down a number key at the prompt ("How many hours?"):

"core/events.cpp:3189: void Ultima::Nuvie::Events::doAction():
Assertion `input.str' failed."

Give priority to requests for text input in Events::handleEvent()
to prevent unrelated events from interfering.

Changed paths:
    engines/ultima/nuvie/core/events.cpp


diff --git a/engines/ultima/nuvie/core/events.cpp b/engines/ultima/nuvie/core/events.cpp
index dcc7a00ab66..774627aa39a 100644
--- a/engines/ultima/nuvie/core/events.cpp
+++ b/engines/ultima/nuvie/core/events.cpp
@@ -328,6 +328,16 @@ bool Events::handleEvent(const Common::Event *event_) {
 	if (game->user_paused())
 		return true;
 
+	// if input was requested, handle it first so other events do not interfere
+	if (input.get_text && scroll->has_input()) {
+		if (active_alt_code) {
+			endAction(); // exit INPUT_MODE
+			alt_code_input(scroll->get_input().c_str());
+		} else {
+			doAction();
+		}
+	}
+
 	switch (event_->type) {
 	case Common::EVENT_MOUSEMOVE:
 		break;
@@ -348,14 +358,6 @@ bool Events::handleEvent(const Common::Event *event_) {
 		break;
 	}
 
-	if (input.get_text && scroll->has_input()) {
-		if (active_alt_code) {
-			endAction(); // exit INPUT_MODE
-			alt_code_input(scroll->get_input().c_str());
-		} else {
-			doAction();
-		}
-	}
 	return true;
 }
 




More information about the Scummvm-git-logs mailing list