aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp
diff options
context:
space:
mode:
authorJoost Peters2009-08-18 17:12:01 +0000
committerJoost Peters2009-08-18 17:12:01 +0000
commited2a733b2a9841f00e8ea2559193044cc4fca8b0 (patch)
tree1385bdd22a41fb95a7a46bd7f43c56045cb17f4e /backends/platform/psp
parent3ade77dfb06ba0d41f123306fcf529c7007351b9 (diff)
downloadscummvm-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')
-rw-r--r--backends/platform/psp/README.PSP.in9
-rw-r--r--backends/platform/psp/osys_psp.cpp17
2 files changed, 15 insertions, 11 deletions
diff --git a/backends/platform/psp/README.PSP.in b/backends/platform/psp/README.PSP.in
index 2a2b53e721..7eeba7d391 100644
--- a/backends/platform/psp/README.PSP.in
+++ b/backends/platform/psp/README.PSP.in
@@ -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
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)