mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 14:58:32 +00:00
Add Android support for automatic disc changing
This commit is contained in:
parent
352ac91a1c
commit
63c9831b93
12 changed files with 100 additions and 30 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "jni/AndroidCommon/AndroidCommon.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
|
@ -24,3 +25,15 @@ jstring ToJString(JNIEnv* env, const std::string& str)
|
|||
{
|
||||
return env->NewStringUTF(str.c_str());
|
||||
}
|
||||
|
||||
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array)
|
||||
{
|
||||
const jsize size = env->GetArrayLength(array);
|
||||
std::vector<std::string> result;
|
||||
result.reserve(size);
|
||||
|
||||
for (jsize i = 0; i < size; ++i)
|
||||
result.push_back(GetJString(env, (jstring)env->GetObjectArrayElement(array, i)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue