Determine android STK platform specifically for lobby icon
This commit is contained in:
parent
da64f5eeab
commit
ffbf5149cd
@ -25,6 +25,7 @@
|
|||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#include "SDL_system.h"
|
#include "SDL_system.h"
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
std::string g_android_main_user_agent;
|
||||||
|
|
||||||
extern int android_main(int argc, char *argv[]);
|
extern int android_main(int argc, char *argv[]);
|
||||||
|
|
||||||
@ -66,6 +67,14 @@ void override_default_params_for_mobile()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
// For usage in StringUtils::getUserAgentString
|
||||||
|
if (SDL_IsAndroidTV())
|
||||||
|
g_android_main_user_agent = " (AndroidTV)";
|
||||||
|
else if (SDL_IsChromebook())
|
||||||
|
g_android_main_user_agent = " (Linux)";
|
||||||
|
else
|
||||||
|
g_android_main_user_agent = " (Android)";
|
||||||
|
|
||||||
// Set multitouch device scale depending on actual screen size
|
// Set multitouch device scale depending on actual screen size
|
||||||
const int SCREENLAYOUT_SIZE_SMALL = 1;
|
const int SCREENLAYOUT_SIZE_SMALL = 1;
|
||||||
const int SCREENLAYOUT_SIZE_NORMAL = 2;
|
const int SCREENLAYOUT_SIZE_NORMAL = 2;
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
|
extern std::string g_android_main_user_agent;
|
||||||
|
|
||||||
namespace StringUtils
|
namespace StringUtils
|
||||||
{
|
{
|
||||||
bool hasSuffix(const std::string& lhs, const std::string &rhs)
|
bool hasSuffix(const std::string& lhs, const std::string &rhs)
|
||||||
@ -1391,7 +1393,7 @@ namespace StringUtils
|
|||||||
#elif defined(__HAIKU__)
|
#elif defined(__HAIKU__)
|
||||||
uagent += (std::string)" (Haiku)";
|
uagent += (std::string)" (Haiku)";
|
||||||
#elif defined(ANDROID)
|
#elif defined(ANDROID)
|
||||||
uagent += (std::string)" (Android)";
|
uagent += g_android_main_user_agent;
|
||||||
#elif defined(linux)
|
#elif defined(linux)
|
||||||
uagent += (std::string)" (Linux)";
|
uagent += (std::string)" (Linux)";
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user