mirror of
https://github.com/glest/glest-source.git
synced 2025-08-12 03:14:00 +02:00
- more thread guards to avoid crashes
This commit is contained in:
@@ -63,13 +63,16 @@ public:
|
||||
void clear() { memset(this, 0, sizeof(MouseState)); }
|
||||
|
||||
bool get(MouseButton b) const {
|
||||
assert(b > 0 && b < mbCount);
|
||||
return states[b];
|
||||
if(b > 0 && b < mbCount) {
|
||||
return states[b];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void set(MouseButton b, bool state) {
|
||||
assert(b > 0 && b < mbCount);
|
||||
states[b] = state;
|
||||
if(b > 0 && b < mbCount) {
|
||||
states[b] = state;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user