use right field when dealing with joysticks. use enum instead of magic value (ny00123)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4179
This commit is contained in:
parent
c9f79add62
commit
b899da315d
1 changed files with 2 additions and 2 deletions
|
@ -712,7 +712,7 @@ public:
|
|||
if (abs(event->jaxis.value)<25000) return 0;
|
||||
return CreateAxisBind(event->jaxis.axis,event->jaxis.value>0);
|
||||
} else if (event->type==SDL_JOYBUTTONDOWN) {
|
||||
if (event->button.which!=stick) return 0;
|
||||
if (event->jbutton.which!=stick) return 0;
|
||||
#if defined (REDUCE_JOYSTICK_POLLING)
|
||||
return CreateButtonBind(event->jbutton.button%button_wrap);
|
||||
#else
|
||||
|
@ -1690,7 +1690,7 @@ static void SetActiveEvent(CEvent * event) {
|
|||
}
|
||||
|
||||
static void DrawButtons(void) {
|
||||
SDL_FillRect(mapper.surface,0,0);
|
||||
SDL_FillRect(mapper.surface,0,CLR_BLACK);
|
||||
SDL_LockSurface(mapper.surface);
|
||||
for (CButton_it but_it = buttons.begin();but_it!=buttons.end();but_it++) {
|
||||
(*but_it)->Draw();
|
||||
|
|
Loading…
Add table
Reference in a new issue