mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 11:27:44 +00:00
SCI32: Fix event type for Direction events
The direction event type changed from 64 in SCI16 to 16 in SCI32. Fixes direction events not appearing when pressing arrow keys in SCI32 games, such as on the QFG4 character creation screen: bug #13223
This commit is contained in:
parent
b370e43004
commit
1b4660a508
@ -295,7 +295,11 @@ reg_t kMapKeyToDir(EngineState *s, int argc, reg_t *argv) {
|
||||
|
||||
if (readSelectorValue(segMan, obj, SELECTOR(type)) == kSciEventKeyDown) {
|
||||
uint16 message = readSelectorValue(segMan, obj, SELECTOR(message));
|
||||
SciEventType eventType = kSciEventDirection;
|
||||
#ifdef ENABLE_SCI32
|
||||
SciEventType eventType = (getSciVersion() < SCI_VERSION_2) ? kSciEventDirection16 : kSciEventDirection32;
|
||||
#else
|
||||
SciEventType eventType = kSciEventDirection16;
|
||||
#endif
|
||||
// It seems with SCI1 Sierra started to add the kSciEventDirection bit instead of setting it directly.
|
||||
// It was done inside the keyboard driver and is required for the PseudoMouse functionality and class
|
||||
// to work (script 933).
|
||||
|
@ -35,9 +35,10 @@ enum SciEventType {
|
||||
kSciEventKeyDown = 1 << 2,
|
||||
kSciEventKeyUp = 1 << 3,
|
||||
kSciEventKey = kSciEventKeyDown | kSciEventKeyUp,
|
||||
kSciEventDirection = 1 << 6,
|
||||
kSciEventDirection16 = 1 << 6, // SCI16
|
||||
kSciEventSaid = 1 << 7,
|
||||
#ifdef ENABLE_SCI32
|
||||
kSciEventDirection32 = 1 << 4, // SCI32
|
||||
kSciEventHotRectangle = 1 << 10,
|
||||
#endif
|
||||
kSciEventQuit = 1 << 11,
|
||||
|
Loading…
x
Reference in New Issue
Block a user