diff options
| author | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-10 13:25:33 +0000 |
|---|---|---|
| committer | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-10 13:25:33 +0000 |
| commit | 8ee251f1379ffab7d0fd914429e834ae672afc57 (patch) | |
| tree | 0c1777bce792bc9e38931ab7c5aa2cd787c34f5a /plugins/dfinput/xkb.c | |
| parent | 1b70fa81feaca1d699357e99a5718df50f400b65 (diff) | |
| download | pcsxr-8ee251f1379ffab7d0fd914429e834ae672afc57.tar.gz | |
Fixed issue #8061 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64383 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput/xkb.c')
| -rw-r--r-- | plugins/dfinput/xkb.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/dfinput/xkb.c b/plugins/dfinput/xkb.c index bfadef10..687b150a 100644 --- a/plugins/dfinput/xkb.c +++ b/plugins/dfinput/xkb.c @@ -34,6 +34,20 @@ void DestroyKeyboard() { XkbSetDetectableAutoRepeat(g.Disp, 0, NULL); } +static void bdown(int pad, int bit) +{ + if(bit < 16) + g.PadState[pad].KeyStatus &= ~(1 << bit); + else if(bit == DKEY_ANALOG) + g.PadState[pad].PadModeSwitch = 1; +} + +static void bup(int pad, int bit) +{ + if(bit < 16) + g.PadState[pad].KeyStatus |= (1 << bit); +} + void CheckKeyboard() { uint8_t i, j, found; XEvent evt; @@ -50,7 +64,7 @@ void CheckKeyboard() { for (j = 0; j < DKEY_TOTAL; j++) { if (g.cfg.PadDef[i].KeyDef[j].Key == Key) { found = 1; - g.PadState[i].KeyStatus &= ~(1 << j); + bdown(i, j); } } } @@ -66,7 +80,7 @@ void CheckKeyboard() { for (j = 0; j < DKEY_TOTAL; j++) { if (g.cfg.PadDef[i].KeyDef[j].Key == Key) { found = 1; - g.PadState[i].KeyStatus |= (1 << j); + bup(i, j); } } } |
