mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Address review
This commit is contained in:
parent
f3f9d1b523
commit
3e0cf57a99
2 changed files with 18 additions and 17 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#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 <SDL.h>
|
||||
#elif defined(_WIN32)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
#elif defined(__ANDROID__)
|
||||
// forward to SDL logging on Android, since stdout/stderr are /dev/null
|
||||
# include <SDL.h>
|
||||
#elif defined(__unix__) || defined(__APPLE__)
|
||||
# include <unistd.h>
|
||||
#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;
|
||||
|
|
Loading…
Reference in a new issue