Add a way to get the "System name" (will be mostly useful for android). Tweaks.

This commit is contained in:
Henrik Rydgard committed 2013-08-18 00:14:25 +02:00
1 parent 2175499217
commit 0a857fe4a1
6 files changed
+20 -2

No files matched your search

+7 -1
View File
@@ -31,6 +31,8 @@ static JNIEnv *jniEnvUI;
std::string frameCommand;
std::string frameCommandParam;
std::string systemName;
const bool extraLog = true;
static float left_joystick_x_async;
@@ -84,6 +86,10 @@ void System_InputBox(const char *title, const char *defaultValue) {
frameCommandParam = title;
}
std::string System_GetName() {
return systemName;
}
// Remember that all of these need initialization on init! The process
// may be reused when restarting the game. Globals are DANGEROUS.
@@ -152,7 +158,7 @@ extern "C" void Java_com_henrikrydgard_libnative_NativeApp_init
ILOG("NativeApp::Init: APK path: %s", apkPath.c_str());
VFSRegister("", new ZipAssetReader(apkPath.c_str(), "assets/"));
std::string deviceType = GetJavaString(env, jdevicetype);
systemName = GetJavaString(env, jdevicetype);
std::string externalDir = GetJavaString(env, jexternalDir);
std::string user_data_path = GetJavaString(env, jdataDir) + "/";