--- hatari/src/gui-sdl/dlgAlert.c 2019/04/01 07:15:41 1.1.1.6 +++ hatari/src/gui-sdl/dlgAlert.c 2019/04/09 08:47:28 1.1.1.7 @@ -16,7 +16,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License (gpl.txt) for more details. */ -const char DlgAlert_rcsid[] = "Hatari $Id: dlgAlert.c,v 1.1.1.6 2019/04/01 07:15:41 root Exp $"; +const char DlgAlert_fileid[] = "Hatari dlgAlert.c : " __DATE__ " " __TIME__; #include @@ -32,11 +32,8 @@ static char dlglines[MAX_LINES][50+1]; #ifdef ALERT_HOOKS // The alert hook functions - extern int HookedAlertNotice(const char* szMessage); // Must return TRUE if OK clicked, FALSE otherwise - extern int HookedAlertQuery(const char* szMessage); // Must return TRUE if OK clicked, FALSE otherwise - - // Runtime switch to activate/deactivate alert hooks - bool useAlertHooks = FALSE; + extern int HookedAlertNotice(const char* szMessage); // Must return true if OK clicked, false otherwise + extern int HookedAlertQuery(const char* szMessage); // Must return true if OK clicked, false otherwise #endif #define DLGALERT_OK 5 @@ -123,7 +120,7 @@ static int DlgAlert_FormatTextToBox(char /*-----------------------------------------------------------------------*/ /* - Show the "alert" dialog. Return TRUE if user pressed "OK". + Show the "alert" dialog. Return true if user pressed "OK". */ static int DlgAlert_ShowDlg(const char *text) { @@ -156,7 +153,7 @@ static int DlgAlert_ShowDlg(const char * free(orig_t); if (SDLGui_SetScreen(sdlscrn)) - return FALSE; + return false; SDLGui_CenterDlg(alertdlg); SDL_GetMouseState(&nOldMouseX, &nOldMouseY); @@ -180,11 +177,7 @@ static int DlgAlert_ShowDlg(const char * int DlgAlert_Notice(const char *text) { #ifdef ALERT_HOOKS - // If activated, used the hooked function instead - if (useAlertHooks) - { - return HookedAlertNotice(text); - } + return HookedAlertNotice(text); #endif /* Hide "cancel" button: */ @@ -206,11 +199,7 @@ int DlgAlert_Notice(const char *text) int DlgAlert_Query(const char *text) { #ifdef ALERT_HOOKS - // If activated, used the hooked function instead - if (useAlertHooks) - { - return HookedAlertQuery(text); - } + return HookedAlertQuery(text); #endif /* Show "cancel" button: */