summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-02 18:48:09 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-02 18:48:09 +0000
commit5a82e8feafabc273d46d017012f1dd426fd8f17f (patch)
tree33928ded138ac4ab9157bd6e142740aa39b60308
parent52c88a3a17de89aaa805db6445ddd6044e8dfcf9 (diff)
downloadpcsxr-5a82e8feafabc273d46d017012f1dd426fd8f17f.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@38684 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--ChangeLog7
-rw-r--r--plugins/dfinput/analog.c18
2 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8581d075..0a96fc6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+December 3, 2009 Wei Mingzhi <weimingzhi@gmail.com>
+
+ * plugins/dfinput/pad.c: Changed the value of center position to 127 instead
+ of 128, which fixes the FF8 problem. Still need further confirmation about
+ this, as all of the protocol docs I've read as well as psemu_plugin_defs.h
+ say 128 is the center position.
+
December 2, 2009 Wei Mingzhi <weimingzhi@gmail.com>
* plugins/dfinput/pad.c: Removed DualShock2-specific stuff in PADpoll().
diff --git a/plugins/dfinput/analog.c b/plugins/dfinput/analog.c
index faa582fc..90285220 100644
--- a/plugins/dfinput/analog.c
+++ b/plugins/dfinput/analog.c
@@ -19,6 +19,7 @@
#include "pad.h"
void InitAnalog() {
+#if 0
g.PadState[0].AnalogStatus[ANALOG_LEFT][ANALOG_X] = 128;
g.PadState[0].AnalogStatus[ANALOG_LEFT][ANALOG_Y] = 128;
g.PadState[0].AnalogStatus[ANALOG_RIGHT][ANALOG_X] = 128;
@@ -27,6 +28,19 @@ void InitAnalog() {
g.PadState[1].AnalogStatus[ANALOG_LEFT][ANALOG_Y] = 128;
g.PadState[1].AnalogStatus[ANALOG_RIGHT][ANALOG_X] = 128;
g.PadState[1].AnalogStatus[ANALOG_RIGHT][ANALOG_Y] = 128;
+#else
+ // use 127 instead of 128 fixes the FF8 "reverting" problem, but
+ // why ALL of the protocol docs I seen as well as psemu_plugin_defs.h
+ // say 128 is the center position?
+ g.PadState[0].AnalogStatus[ANALOG_LEFT][ANALOG_X] = 127;
+ g.PadState[0].AnalogStatus[ANALOG_LEFT][ANALOG_Y] = 127;
+ g.PadState[0].AnalogStatus[ANALOG_RIGHT][ANALOG_X] = 127;
+ g.PadState[0].AnalogStatus[ANALOG_RIGHT][ANALOG_Y] = 127;
+ g.PadState[1].AnalogStatus[ANALOG_LEFT][ANALOG_X] = 127;
+ g.PadState[1].AnalogStatus[ANALOG_LEFT][ANALOG_Y] = 127;
+ g.PadState[1].AnalogStatus[ANALOG_RIGHT][ANALOG_X] = 127;
+ g.PadState[1].AnalogStatus[ANALOG_RIGHT][ANALOG_Y] = 127;
+#endif
}
void CheckAnalog() {
@@ -48,7 +62,11 @@ void CheckAnalog() {
val = SDL_JoystickGetAxis(g.PadState[i].JoyDev, n);
+#if 0
val += 32768;
+#else
+ val += 32767;
+#endif
val /= 256;
if (g.cfg.PadDef[i].AnalogDef[j][k] < 0) {