#14781 closed defect (fixed)

SCUMM: Numpad keys get picked up multiple times in Dial a Pirate test for Monkey Island EGA

Reported by: antoniou79 Owned by: AndywinXp
Priority: normal Component: Engine: SCUMM
Version: Keywords: EGA, copy protection, dial a pirate, numpad
Cc: Game: Monkey Island 1

Description

This was tested on ScummVM 2.8.0 and ScummVM 2.9.0git current build from master HEAD on Windows 10 x64.

The bug was originally reported on the forum by member Wronschien here: https://forums.scummvm.org/viewtopic.php?p=99046#p99046

Steps to reproduce:

  • Launch Secret of the Monkey Island EGA version, and reach the copy-protection check screen
  • Press the numpad keys on your keyboard to write the year reponse.

What happens:

  • Pressing the numpad keys may cause the corresponding number digit to be "pressed" twice.

What should happen:

  • Each keystroke of the numpad keys should be picked up once, without repetition (unless it's held down past the repetition duration threshold)

This bug seems to be a regression, since 2.7.1 version does not have this issue.

Bisecting points to this commit as the offender for this behavior:
https://github.com/scummvm/scummvm/commit/e8ea447c908c443889d2fc9a7121781dad65ab0f
"SCUMM: Fix remapping of numpad keys on EVENT_KEYUP"

Change History (4)

comment:1 by eriktorbjorn, 11 months ago

This can also be reproduced with the VGA floppy and (some) Mac versions of Monkey Island 1 (if you enable the copy protection) and Monkey Island 2. (Probably others, but those are the ones I own.) This isn't surprising, I'm just mentioning it because I imagine at least Monkey Island 2 to be a lot more commonly available among ScummVM developers.

Last edited 11 months ago by eriktorbjorn (previous) (diff)

comment:2 by antoniou79, 11 months ago

If it helps further, the commit was from this Pull Request:
https://github.com/scummvm/scummvm/pull/5406

And, as mentioned in the comments sections, there was a follow-up commit for this that also reads as relevant:
https://github.com/scummvm/scummvm/commit/5d5cc0561019fe3ae813e1810a8cda9c877e7104

SCUMM: Improve numpad remapping following PR #5406
In particular we set the _keyPressed object only when we find
an event.kbd for the numpad keys. Otherwise we immediately
get double events when pressing any key.

comment:4 by AndywinXp, 10 months ago

Owner: set to AndywinXp
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.