aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp/input.h
diff options
context:
space:
mode:
authorrsn88872018-01-05 15:35:05 -0600
committerrsn88872018-01-05 15:51:39 -0600
commite78984147d06dbbc1e1c373c90a8bdd02bc0d1e0 (patch)
tree0c5ba99e1d6364531a53189dcd8a33090c67a795 /backends/platform/psp/input.h
parentb2cf5a30bfbb41500a9b81417614d6a9dbb50e6f (diff)
downloadscummvm-rg350-e78984147d06dbbc1e1c373c90a8bdd02bc0d1e0.tar.gz
scummvm-rg350-e78984147d06dbbc1e1c373c90a8bdd02bc0d1e0.tar.bz2
scummvm-rg350-e78984147d06dbbc1e1c373c90a8bdd02bc0d1e0.zip
PSP: fix bit shifts of cursor x/y, fix too-slow cursor
Diffstat (limited to 'backends/platform/psp/input.h')
-rw-r--r--backends/platform/psp/input.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/platform/psp/input.h b/backends/platform/psp/input.h
index 05b575e0b0..ff89b9faec 100644
--- a/backends/platform/psp/input.h
+++ b/backends/platform/psp/input.h
@@ -139,6 +139,8 @@ private:
Cursor *_cursor; // to enable changing/getting cursor position
ShiftMode _shifted;
+ int32 _hiresX; // to accumulate analog X over many frames
+ int32 _hiresY; // to accumulate analog Y over many frames
bool _dpadMode;
ButtonPad _buttonPad; // private buttonpad for dpad mode
@@ -146,7 +148,7 @@ private:
int32 modifyNubAxisMotion(int32 input);
void translateToDpadState(int dpadX, int dpadY, uint32 &buttonState); // convert nub data to dpad data
public:
- Nub() : _shifted(UNSHIFTED), _dpadMode(false) { }
+ Nub() : _shifted(UNSHIFTED), _dpadMode(false), _hiresX(0), _hiresY(0) { }
void init() { _buttonPad.initButtons(); }
void setCursor(Cursor *cursor) { _cursor = cursor; }