mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
PEGASUS: Handle mouse wheel events using the keymapper
This commit is contained in:
parent
394288db98
commit
4e33d6ad2b
@ -63,18 +63,8 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) {
|
||||
InputBits currentBits = 0;
|
||||
|
||||
Common::Event event;
|
||||
while (g_system->getEventManager()->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_WHEELUP:
|
||||
currentBits |= (kRawButtonDown << kUpButtonShift);
|
||||
break;
|
||||
case Common::EVENT_WHEELDOWN:
|
||||
currentBits |= (kRawButtonDown << kDownButtonShift);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (g_system->getEventManager()->pollEvent(event))
|
||||
;
|
||||
|
||||
// Now fill in the rest of the bitfield
|
||||
if (_keysDown[kPegasusActionUp])
|
||||
|
@ -2713,6 +2713,7 @@ Common::KeymapArray PegasusEngine::initKeymaps() {
|
||||
act->addDefaultInputMapping("UP");
|
||||
act->addDefaultInputMapping("KP8");
|
||||
act->addDefaultInputMapping("JOY_UP");
|
||||
act->addDefaultInputMapping("MOUSE_WHEEL_UP");
|
||||
engineKeyMap->addAction(act);
|
||||
|
||||
act = new Action(kStandardActionMoveDown, _("Down/Zoom Out"));
|
||||
@ -2720,6 +2721,7 @@ Common::KeymapArray PegasusEngine::initKeymaps() {
|
||||
act->addDefaultInputMapping("DOWN");
|
||||
act->addDefaultInputMapping("KP5");
|
||||
act->addDefaultInputMapping("JOY_DOWN");
|
||||
act->addDefaultInputMapping("MOUSE_WHEEL_DOWN");
|
||||
engineKeyMap->addAction(act);
|
||||
|
||||
act = new Action(kStandardActionMoveLeft, _("Turn Left"));
|
||||
|
Loading…
Reference in New Issue
Block a user