--- 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:53:28 1.1.1.10 @@ -1,10 +1,10 @@ /* Hatari - dlgJoystick.c - 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. + This file is distributed under the GNU General 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" @@ -84,9 +84,9 @@ static char *sJoystickNames[JOYSTICK_COU /*-----------------------------------------------------------------------*/ -/* - Show dialogs for defining joystick keys and wait for a key press. -*/ +/** + * Show dialogs for defining joystick keys and wait for a key press. + */ static void DlgJoystick_DefineOneKey(char *pType, int *pKey) { SDL_Event sdlEvent; @@ -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); @@ -119,9 +119,9 @@ static void DlgJoystick_DefineOneKey(cha /*-----------------------------------------------------------------------*/ -/* - Let the user define joystick keys. -*/ +/** + * Let the user define joystick keys. + */ static void DlgJoystick_DefineKeys(int nActJoy) { @@ -135,9 +135,9 @@ static void DlgJoystick_DefineKeys(int n /*-----------------------------------------------------------------------*/ -/* - Adapt dialog using the values from the configration structure. -*/ +/** + * Adapt dialog using the values from the configration structure. + */ static void DlgJoystick_ReadValuesFromConf(int nActJoy, int nMaxId) { int i; @@ -172,17 +172,17 @@ static void DlgJoystick_ReadValuesFromCo /*-----------------------------------------------------------------------*/ -/* - Read values from dialog and write them to the configuration structure. -*/ +/** + * Read values from dialog and write them to the configuration structure. + */ 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; } } @@ -193,9 +193,9 @@ static void DlgJoystick_WriteValuesToCon /*-----------------------------------------------------------------------*/ -/* - Show and process the joystick dialog. -*/ +/** + * Show and process the joystick dialog. + */ void Dialog_JoyDlg(void) { int but;