diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp index d0646343..c77c9998 100644 --- a/desktop_version/src/Screen.cpp +++ b/desktop_version/src/Screen.cpp @@ -376,18 +376,15 @@ void Screen::recacheTextures(void) } } -#ifdef __ANDROID__ -bool Screen::isForcedFullscreen(void) -{ - return true; -} -#else bool Screen::isForcedFullscreen(void) { /* This is just a check to see if we're on a desktop or tenfoot setup. * If you're working on a tenfoot-only build, add a def that always * returns true! */ +#ifdef __ANDROID__ + return true; +#else return SDL_GetHintBoolean("SteamTenfoot", SDL_FALSE); -} #endif +} diff --git a/desktop_version/src/Vlogging.c b/desktop_version/src/Vlogging.c index 2277751d..fd1f5d2e 100644 --- a/desktop_version/src/Vlogging.c +++ b/desktop_version/src/Vlogging.c @@ -2,12 +2,16 @@ #include #include -#ifdef _WIN32 +#ifdef __ANDROID__ +// forward to SDL logging on Android, since stdout/stderr are /dev/null +#define VLOG_USE_SDL 1 +#endif + +#ifdef VLOG_USE_SDL +# include +#elif defined(_WIN32) # define WIN32_LEAN_AND_MEAN # include -#elif defined(__ANDROID__) -// forward to SDL logging on Android, since stdout/stderr are /dev/null -# include #elif defined(__unix__) || defined(__APPLE__) # include #endif @@ -32,7 +36,7 @@ static void check_color_support(void); void vlog_init(void) { -#ifdef __ANDROID__ +#ifdef VLOG_USE_SDL SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE); #endif check_color_support(); @@ -77,7 +81,7 @@ SDL_PRINTF_VARARG_FUNC(1) void vlog_debug(const char* text, ...) return; } -#ifdef __ANDROID__ +#ifdef VLOG_USE_SDL va_start(list, text); SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, text, list); va_end(list); @@ -104,7 +108,7 @@ SDL_PRINTF_VARARG_FUNC(1) void vlog_info(const char* text, ...) return; } -#ifdef __ANDROID__ +#ifdef VLOG_USE_SDL va_start(list, text); SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, text, list); va_end(list); @@ -131,7 +135,7 @@ SDL_PRINTF_VARARG_FUNC(1) void vlog_warn(const char* text, ...) return; } -#ifdef __ANDROID__ +#ifdef VLOG_USE_SDL va_start(list, text); SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, text, list); va_end(list); @@ -158,7 +162,7 @@ SDL_PRINTF_VARARG_FUNC(1) void vlog_error(const char* text, ...) return; } -#ifdef __ANDROID__ +#ifdef VLOG_USE_SDL va_start(list, text); SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, text, list); va_end(list); @@ -255,7 +259,7 @@ static void check_color_support(void) } color_supported = 1; -#elif (defined(__unix__) || defined(__APPLE__)) && !defined(__ANDROID__) +#elif (defined(__unix__) || defined(__APPLE__)) && !defined(VLOG_USE_SDL) if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO)) { color_supported = 1;