Skip to content

Commit c6b8ec9

Browse files
author
qbix79
committed
use right field when dealing with joysticks. use enum instead of magic value (ny00123)
git-svn-id: http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4179 ed541006-0bf7-43e9-8c4d-6fc63c346d47
1 parent 1bbb088 commit c6b8ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/sdl_mapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ class CStickBindGroup : public CBindGroup {
712712
if (abs(event->jaxis.value)<25000) return 0;
713713
return CreateAxisBind(event->jaxis.axis,event->jaxis.value>0);
714714
} else if (event->type==SDL_JOYBUTTONDOWN) {
715-
if (event->button.which!=stick) return 0;
715+
if (event->jbutton.which!=stick) return 0;
716716
#if defined (REDUCE_JOYSTICK_POLLING)
717717
return CreateButtonBind(event->jbutton.button%button_wrap);
718718
#else
@@ -1690,7 +1690,7 @@ static void SetActiveEvent(CEvent * event) {
16901690
}
16911691

16921692
static void DrawButtons(void) {
1693-
SDL_FillRect(mapper.surface,0,0);
1693+
SDL_FillRect(mapper.surface,0,CLR_BLACK);
16941694
SDL_LockSurface(mapper.surface);
16951695
for (CButton_it but_it = buttons.begin();but_it!=buttons.end();but_it++) {
16961696
(*but_it)->Draw();

0 commit comments

Comments
 (0)