mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-19 15:13:10 +00:00
Blackberry/Symbian: Improve tilt.
This commit is contained in:
parent
edd712c65d
commit
c520884888
@ -39,12 +39,10 @@ inline float clamp(float f) {
|
||||
|
||||
|
||||
Tilt TiltEventProcessor::NormalizeTilt(const Tilt &tilt){
|
||||
//setup the maximum values of the accelerometer manually per-platform
|
||||
//TODO: less hacky way of doing this?
|
||||
#ifdef ANDROID
|
||||
//I obtained these values EXPERIMENTALLY. They may differ device to device.
|
||||
//needs more testing. I'll be testing it on the Nexus 4 once I get mine back.
|
||||
float maxX = 10, maxY = 8;
|
||||
// Normalise the accelerometer manually per-platform, to 'g'
|
||||
#if defined(ANDROID) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
|
||||
// Values are in metres per second. Divide by 9.8 to get 'g' value
|
||||
float maxX = 9.8f, maxY = 9.8f;
|
||||
#else
|
||||
float maxX = 1.0, maxY = 1.0;
|
||||
#endif
|
||||
@ -167,4 +165,4 @@ void TiltEventProcessor::ResetTiltEvents() {
|
||||
//analog
|
||||
__CtrlSetAnalogX(0.0f, CTRL_STICK_LEFT);
|
||||
__CtrlSetAnalogY(0.0f, CTRL_STICK_LEFT);
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user