PSP: Make R-trigger act as a context sensitive modifier key, remap ENTER to triangle
svn-id: r43517
This commit is contained in:
parent
3ade77dfb0
commit
ed2a733b2a
2 changed files with 15 additions and 11 deletions
|
@ -13,15 +13,17 @@ Controls
|
|||
========
|
||||
|
||||
Left trigger - ESC
|
||||
Right trigger - Enter
|
||||
Right trigger - Modifier key (see below for uses)
|
||||
Analog - Mouse movement
|
||||
Right trigger + Analog - Fine control mouse
|
||||
Directionals - Mouse movement
|
||||
Analog + triangle - Fine control mouse
|
||||
Triangle - Enter
|
||||
Cross - Mouse button 1
|
||||
Circle - Mouse button 2
|
||||
Square - '.' (skip dialogue in some games)
|
||||
Select - Show/Hide Virtual Keyboard
|
||||
Start - F5
|
||||
Right trigger + Start - Return-To-Launcher menu
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
@ -32,9 +34,6 @@ Notes
|
|||
As such, it is recommended to play games in their original, uncompressed,
|
||||
form whenever possible.
|
||||
|
||||
- Sleep/Suspend mode currently isn't supported, so don't use it when
|
||||
running ScummVM.
|
||||
|
||||
- This README may be outdated, for more up-to-date instructions and notes see
|
||||
the PSP Port Wiki: http://wiki.scummvm.org/index.php/PlayStation_Portable
|
||||
|
||||
|
|
|
@ -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;
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue