[Scummvm-cvs-logs] SF.net SVN: scummvm:[43517] scummvm/trunk/backends/platform/psp
joostp at users.sourceforge.net
joostp at users.sourceforge.net
Tue Aug 18 19:12:02 CEST 2009
Revision: 43517
http://scummvm.svn.sourceforge.net/scummvm/?rev=43517&view=rev
Author: joostp
Date: 2009-08-18 17:12:01 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
PSP: Make R-trigger act as a context sensitive modifier key, remap ENTER to triangle
Modified Paths:
--------------
scummvm/trunk/backends/platform/psp/README.PSP.in
scummvm/trunk/backends/platform/psp/osys_psp.cpp
Modified: scummvm/trunk/backends/platform/psp/README.PSP.in
===================================================================
--- scummvm/trunk/backends/platform/psp/README.PSP.in 2009-08-18 15:57:54 UTC (rev 43516)
+++ scummvm/trunk/backends/platform/psp/README.PSP.in 2009-08-18 17:12:01 UTC (rev 43517)
@@ -13,15 +13,17 @@
========
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 @@
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
Modified: scummvm/trunk/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.cpp 2009-08-18 15:57:54 UTC (rev 43516)
+++ scummvm/trunk/backends/platform/psp/osys_psp.cpp 2009-08-18 17:12:01 UTC (rev 43517)
@@ -411,7 +411,7 @@
*/
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 @@
} 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 @@
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)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list