mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 07:11:49 +00:00
SCI: Minor cleanups in kGetEvent
This commit is contained in:
parent
3d92f05261
commit
6b87b13ab1
@ -72,7 +72,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
|
||||
writeSelectorValue(segMan, obj, SELECTOR(x), mousePos.x);
|
||||
writeSelectorValue(segMan, obj, SELECTOR(y), mousePos.y);
|
||||
g_debug_simulated_key = 0;
|
||||
return make_reg(0, 1);
|
||||
return TRUE_REG;
|
||||
}
|
||||
|
||||
curEvent = g_sci->getEventManager()->getSciEvent(mask);
|
||||
@ -183,11 +183,10 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
|
||||
|
||||
case SCI_EVENT_KEYBOARD:
|
||||
writeSelectorValue(segMan, obj, SELECTOR(type), SCI_EVENT_KEYBOARD); // Keyboard event
|
||||
s->r_acc = make_reg(0, 1);
|
||||
|
||||
writeSelectorValue(segMan, obj, SELECTOR(message), curEvent.character);
|
||||
// We only care about the translated character
|
||||
writeSelectorValue(segMan, obj, SELECTOR(modifiers), modifiers);
|
||||
s->r_acc = TRUE_REG;
|
||||
break;
|
||||
|
||||
case SCI_EVENT_MOUSE_RELEASE:
|
||||
@ -202,7 +201,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
|
||||
writeSelectorValue(segMan, obj, SELECTOR(type), curEvent.type);
|
||||
writeSelectorValue(segMan, obj, SELECTOR(message), 0);
|
||||
writeSelectorValue(segMan, obj, SELECTOR(modifiers), modifiers);
|
||||
s->r_acc = make_reg(0, 1);
|
||||
s->r_acc = TRUE_REG;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user