diff --git a/src/win32/DirectInput.cpp b/src/win32/DirectInput.cpp index 21eb5b25..4a08769c 100644 --- a/src/win32/DirectInput.cpp +++ b/src/win32/DirectInput.cpp @@ -86,7 +86,7 @@ static int joyDebug = 0; static int axisNumber = 0; -KeyList joypad[JOYPADS * KEYS_PER_PAD + MOTION_KEYS]; +//KeyList joypad[JOYPADS * KEYS_PER_PAD + MOTION_KEYS]; USHORT defvalues[JOYPADS * KEYS_PER_PAD + MOTION_KEYS] = @@ -151,7 +151,7 @@ void winReadKeys() winReadKey("Motion_Down", joypad[MOTION(KEY_DOWN)]); } -void winSaveKey(char *name, KeyList &value) +void winSaveKey(char *name, KeyList& value) { CString txtKeys; diff --git a/src/win32/Input.h b/src/win32/Input.h index 596b75b0..7efaf18b 100644 --- a/src/win32/Input.h +++ b/src/win32/Input.h @@ -45,8 +45,9 @@ enum { }; class Input { - public: + KeyList joypaddata[JOYPADS * KEYS_PER_PAD + MOTION_KEYS]; + Input() {}; virtual ~Input() {}; @@ -63,4 +64,6 @@ class Input { virtual void saveSettings() = 0; }; +#define joypad theApp.input->joypaddata + #endif diff --git a/src/win32/Joypad.cpp b/src/win32/Joypad.cpp index e2be4ead..9d15f694 100644 --- a/src/win32/Joypad.cpp +++ b/src/win32/Joypad.cpp @@ -31,8 +31,6 @@ static char THIS_FILE[] = __FILE__; #endif -extern KeyList joypad[JOYPADS * KEYS_PER_PAD + MOTION_KEYS]; - // Todo: Expand UI to allow user to enter multiple keys here. int TempReadFirst(KeyList &Key)