--- a/brewpanel/brewpanel.c Fri Nov 20 23:29:55 2015 +0100 +++ b/brewpanel/brewpanel.c Wed Nov 25 15:30:28 2015 +0100 @@ -26,7 +26,6 @@ #ifdef HAVE_SDL_SDL_H -int DebugPanel = FALSE; /* Logfile debugging */ int debug = FALSE; /* Console debugging */ int my_shutdown = FALSE; /* Shutdown requested */ char *Paneltype = NULL; /* Panel to emulate */ @@ -44,7 +43,7 @@ fprintf(stdout, "Usage: brewpanel [-d] [-h] [-p <paneltype>]\n"); fprintf(stdout, " -d --debug Debug on\n"); fprintf(stdout, " -h --help Display this help\n"); - fprintf(stdout, " -p --paneltype <ferm|brew> Select machine, default last used\n"); + fprintf(stdout, " -p --paneltype <ferm|brew> Select panel type\n"); } @@ -92,7 +91,7 @@ break; switch (c) { - case 'd': DebugPanel = TRUE; + case 'd': debug = TRUE; break; case 'h': help(); return 1; @@ -138,7 +137,8 @@ PAN_x = 384; PAN_y = 480; -fprintf(stdout, "Screen max X*Y: %d*%d panel X*Y: %d*%d\n", max_x, max_y, PAN_x, PAN_y); + if (debug) + fprintf(stdout, "Screen max X*Y: %d*%d panel X*Y: %d*%d\n", max_x, max_y, PAN_x, PAN_y); PAN_surface = SDL_SetVideoMode( PAN_x, PAN_y, 32, SDL_SWSURFACE|SDL_DOUBLEBUF ); if (PAN_surface == NULL) { @@ -151,7 +151,11 @@ SDL_WM_SetCaption(title, NULL); syslog(LOG_NOTICE, "Starting mainloop"); - Dialog_BrewDlg(1); + if (strlen(Paneltype) && !strcmp(Paneltype, (char *)"ferm") ) { + Dialog_BrewDlg(1); + } else { + Dialog_BrewDlg(0); + } syslog(LOG_NOTICE, "Out of mainloop, cleanup"); SDLGui_UnInit();