--- hatari/src/gui-sdl/dlgJoystick.c 2019/04/01 07:15:39 1.1.1.7 +++ hatari/src/gui-sdl/dlgJoystick.c 2019/04/09 08:47:26 1.1.1.8 @@ -4,7 +4,7 @@ This file is distributed under the GNU Public License, version 2 or at your option any later version. Read the file gpl.txt for details. */ -const char DlgJoystick_rcsid[] = "Hatari $Id: dlgJoystick.c,v 1.1.1.7 2019/04/01 07:15:39 root Exp $"; +const char DlgJoystick_fileid[] = "Hatari dlgJoystick.c : " __DATE__ " " __TIME__; #include "main.h" #include "configuration.h" @@ -110,7 +110,7 @@ static void DlgJoystick_DefineOneKey(cha } else if (sdlEvent.type == SDL_QUIT) { - bQuitProgram = TRUE; + bQuitProgram = true; return; } } while (sdlEvent.type != SDL_KEYUP); @@ -177,12 +177,12 @@ static void DlgJoystick_ReadValuesFromCo */ static void DlgJoystick_WriteValuesToConf(int nActJoy) { - int i; - for (i = DLGJOY_DISABLED; i <= DLGJOY_USEKEYS; i++) + JOYSTICKMODE jmi; + for (jmi = JOYSTICK_DISABLED; jmi <= JOYSTICK_KEYBOARD; jmi++) { - if (joydlg[i].state & SG_SELECTED) + if (joydlg[jmi + DLGJOY_DISABLED].state & SG_SELECTED) { - ConfigureParams.Joysticks.Joy[nActJoy].nJoystickMode = i - DLGJOY_DISABLED; + ConfigureParams.Joysticks.Joy[nActJoy].nJoystickMode = jmi; break; } }