mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-19 20:34:26 +01:00
Improve Moga version detection - do it after the connect event.
This commit is contained in:
1 parent
6ec765dcf4
commit
4dce24d05c
3 files changed
+18
-6
No files matched your search
@@ -43,6 +43,7 @@ std::queue<FrameCommand> frameCommands;
|
||||
|
||||
std::string systemName;
|
||||
std::string langRegion;
|
||||
std::string mogaVersion;
|
||||
|
||||
static float left_joystick_x_async;
|
||||
static float left_joystick_y_async;
|
||||
@@ -103,6 +104,8 @@ std::string System_GetProperty(SystemProperty prop) {
|
||||
return systemName;
|
||||
case SYSPROP_LANGREGION: // "en_US"
|
||||
return langRegion;
|
||||
case SYSPROP_MOGA_VERSION:
|
||||
return mogaVersion;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@@ -519,5 +522,9 @@ extern "C" jboolean JNICALL Java_com_henrikrydgard_libnative_NativeApp_accelerom
|
||||
extern "C" void Java_com_henrikrydgard_libnative_NativeApp_sendMessage(JNIEnv *env, jclass, jstring message, jstring param) {
|
||||
std::string msg = GetJavaString(env, message);
|
||||
std::string prm = GetJavaString(env, param);
|
||||
|
||||
if (msg == "moga") {
|
||||
mogaVersion = prm;
|
||||
}
|
||||
NativeMessageReceived(msg.c_str(), prm.c_str());
|
||||
}
|
||||
Reference in new issue
Block a user