summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--plugins/dfinput/pad.h22
2 files changed, 12 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 7772a3ff..55a1dc9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ October 30, 2009 Wei Mingzhi <weimingzhi@gmail.com>
* data/pcsx.glade2: Do not allow resizing for dialog boxes.
* plugins/dfsound/spucfg-0.1df/dfsound.glade2: Likewise.
* plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise.
+ * plugins/dfinput/pad.h: Declare several variables as volatile.
October 29, 2009 Wei Mingzhi <weimingzhi@gmail.com>
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
index 9b71fab0..de63db69 100644
--- a/plugins/dfinput/pad.h
+++ b/plugins/dfinput/pad.h
@@ -108,22 +108,22 @@ typedef struct tagConfig {
} CONFIG;
typedef struct tagPadState {
- SDL_Joystick *JoyDev;
- uint8_t PadMode;
- uint8_t PadID;
- uint16_t KeyStatus;
- uint16_t JoyKeyStatus;
- uint8_t AnalogStatus[ANALOG_TOTAL][2]; // 0-255 where 128 is center position
+ SDL_Joystick *JoyDev;
+ uint8_t PadMode;
+ uint8_t PadID;
+ volatile uint16_t KeyStatus;
+ volatile uint16_t JoyKeyStatus;
+ volatile uint8_t AnalogStatus[ANALOG_TOTAL][2]; // 0-255 where 128 is center position
} PADSTATE;
typedef struct tagGlobalData {
- CONFIG cfg;
+ CONFIG cfg;
- uint8_t Opened;
- Display *Disp;
+ uint8_t Opened;
+ Display *Disp;
- PADSTATE PadState[2];
- long KeyLeftOver;
+ PADSTATE PadState[2];
+ volatile long KeyLeftOver;
} GLOBALDATA;
extern GLOBALDATA g;