mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Simplify loading of Android version of menu
This commit is contained in:
parent
d2b5ba83b0
commit
c4e393deea
6 changed files with 134 additions and 148 deletions
|
@ -371,6 +371,46 @@ v2u32 getDisplaySize();
|
|||
v2u32 getWindowSize();
|
||||
#endif
|
||||
|
||||
inline const char * getPlatformName()
|
||||
{
|
||||
return
|
||||
#if defined(ANDROID)
|
||||
"Android"
|
||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||
"Linux"
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
"Windows"
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__) || \
|
||||
defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
"BSD"
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
#if TARGET_OS_MAC
|
||||
"OSX"
|
||||
#elif TARGET_OS_IPHONE
|
||||
"iOS"
|
||||
#else
|
||||
"Apple"
|
||||
#endif
|
||||
#elif defined(_AIX)
|
||||
"AIX"
|
||||
#elif defined(__hpux)
|
||||
"HP-UX"
|
||||
#elif defined(__sun) && defined(__SVR4)
|
||||
"Solaris"
|
||||
#elif defined(__CYGWIN__)
|
||||
"Cygwin"
|
||||
#elif defined(__unix__) || defined(__unix)
|
||||
#if defined(_POSIX_VERSION)
|
||||
"Posix"
|
||||
#else
|
||||
"Unix"
|
||||
#endif
|
||||
#else
|
||||
"?"
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
} // namespace porting
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue