Fix save key settings bug. Destructor of my global key lists were getting called
before DirectInput destructor. How rude...
This commit is contained in:
parent
fca8f9f480
commit
aa77ce816d
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue