diff options
author | Joost Peters | 2009-08-18 17:12:01 +0000 |
---|---|---|
committer | Joost Peters | 2009-08-18 17:12:01 +0000 |
commit | ed2a733b2a9841f00e8ea2559193044cc4fca8b0 (patch) | |
tree | 1385bdd22a41fb95a7a46bd7f43c56045cb17f4e /backends/platform/psp/osys_psp.cpp | |
parent | 3ade77dfb06ba0d41f123306fcf529c7007351b9 (diff) | |
download | scummvm-rg350-ed2a733b2a9841f00e8ea2559193044cc4fca8b0.tar.gz scummvm-rg350-ed2a733b2a9841f00e8ea2559193044cc4fca8b0.tar.bz2 scummvm-rg350-ed2a733b2a9841f00e8ea2559193044cc4fca8b0.zip |
PSP: Make R-trigger act as a context sensitive modifier key, remap ENTER to triangle
svn-id: r43517
Diffstat (limited to 'backends/platform/psp/osys_psp.cpp')
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 8a7a0af0ed..d1886c253f 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -411,7 +411,7 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { */ uint32 buttonsChanged = pad.Buttons ^ _prevButtons; - if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START | PSP_CTRL_SELECT | PSP_CTRL_SQUARE)) { + if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START | PSP_CTRL_SELECT | PSP_CTRL_SQUARE | PSP_CTRL_TRIANGLE)) { if (buttonsChanged & PSP_CTRL_CROSS) { event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_LBUTTONDOWN : Common::EVENT_LBUTTONUP; } else if (buttonsChanged & PSP_CTRL_CIRCLE) { @@ -419,24 +419,29 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { } else { //any of the other buttons. event.type = buttonsChanged & pad.Buttons ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP; + event.kbd.ascii = 0; event.kbd.flags = 0; if (buttonsChanged & PSP_CTRL_LTRIGGER) { event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = 27; - } else if (buttonsChanged & PSP_CTRL_RTRIGGER) { - event.kbd.keycode = Common::KEYCODE_RETURN; - event.kbd.ascii = 13; } else if (buttonsChanged & PSP_CTRL_START) { event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; - event.kbd.flags = Common::KBD_CTRL; // Main menu to allow RTL + if (pad.Buttons & PSP_CTRL_RTRIGGER) { + event.kbd.flags = Common::KBD_CTRL; // Main menu to allow RTL + } /* } else if (buttonsChanged & PSP_CTRL_SELECT) { event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = '0'; */ } else if (buttonsChanged & PSP_CTRL_SQUARE) { event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = '.'; + } else if (buttonsChanged & PSP_CTRL_TRIANGLE) { + event.kbd.keycode = Common::KEYCODE_RETURN; + event.kbd.ascii = 13; + } else if (pad.Buttons & PSP_CTRL_RTRIGGER) { + event.kbd.flags |= Common::KBD_SHIFT; } } @@ -485,7 +490,7 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { newY += _padAccel >> 2; // If no movement then this has no effect - if (pad.Buttons & PSP_CTRL_TRIANGLE) { + if (pad.Buttons & PSP_CTRL_RTRIGGER) { // Fine control mode for analog if (analogStepAmountX != 0) { if (analogStepAmountX > 0) |