SSSPSX: Slight change to analog stick zero position, at rama1's suggestion. Zero should be 0x7F instead of 0x80. Untested, as I don't use the plugin and am rather lazy.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2587 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
MattMenke@gmail.com 2010-02-11 16:09:00 +00:00
parent 9d2699529a
commit 742bae8d94
1 changed files with 12 additions and 7 deletions

View File

@ -852,7 +852,12 @@ static u8 get_analog (const int key)
{
const int pad = ((key & 0xf00) / 0x100);
const int pos = ((key & 0x0ff) /2);
return (u8)(((int*)&global.JoyState[pad].lX)[pos] + 128);
int value = (((int*)&global.JoyState[pad].lX)[pos] + 0x7F);
if (value >= 0xC0) value++;
if (value < 0) value = 0;
// Don't think this happens, but just in case...
if (value > 0xFF) value = 0xFF;
return (u8)value;
}
static u8 get_pressure (const DWORD now, const DWORD press)