diff --git a/src/kits/device/Joystick.cpp b/src/kits/device/Joystick.cpp index 430ea494fa..e9d338a73e 100644 --- a/src/kits/device/Joystick.cpp +++ b/src/kits/device/Joystick.cpp @@ -21,6 +21,8 @@ #if DEBUG +static FILE *sLogFile = NULL; + inline void LOG(const char *fmt, ...) { @@ -29,13 +31,11 @@ LOG(const char *fmt, ...) va_start(ap, fmt); vsprintf(buf, fmt, ap); va_end(ap); - fputs(buf, BJoystick::sLogFile); fflush(BJoystick::sLogFile); + fputs(buf, sLogFile); fflush(sLogFile); } # define LOG_ERR(text...) LOG(text) -static FILE *sLogFile = NULL; - #else # define LOG(text...) # define LOG_ERR(text...) fprintf(stderr, text)