mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
(Android) Small change to PlatformUtil
This commit is contained in:
parent
25f017d9f8
commit
b2e9507b0e
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// ES-DE
|
||||||
// Platform.cpp
|
// Platform.cpp
|
||||||
//
|
//
|
||||||
// Platform utility functions.
|
// Platform utility functions.
|
||||||
|
@ -378,7 +378,7 @@ namespace Utils
|
||||||
{
|
{
|
||||||
// TODO: Wait for interface to close and check actual outcome.
|
// TODO: Wait for interface to close and check actual outcome.
|
||||||
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
||||||
jclass jniClass {jniEnv->FindClass("org/esde/esde/esde")};
|
jclass jniClass {jniEnv->FindClass("org/es_de/frontend/MainActivity")};
|
||||||
jmethodID methodID {
|
jmethodID methodID {
|
||||||
jniEnv->GetStaticMethodID(jniClass, "requestStoragePermissions", "()Z")};
|
jniEnv->GetStaticMethodID(jniClass, "requestStoragePermissions", "()Z")};
|
||||||
const bool result {
|
const bool result {
|
||||||
|
@ -390,7 +390,7 @@ namespace Utils
|
||||||
bool checkEmulatorInstalled(const std::string& packageName, const std::string& activity)
|
bool checkEmulatorInstalled(const std::string& packageName, const std::string& activity)
|
||||||
{
|
{
|
||||||
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
||||||
jclass jniClass {jniEnv->FindClass("org/esde/esde/esde")};
|
jclass jniClass {jniEnv->FindClass("org/es_de/frontend/MainActivity")};
|
||||||
jmethodID methodID {jniEnv->GetStaticMethodID(
|
jmethodID methodID {jniEnv->GetStaticMethodID(
|
||||||
jniClass, "checkEmulatorInstalled", "(Ljava/lang/String;Ljava/lang/String;)Z")};
|
jniClass, "checkEmulatorInstalled", "(Ljava/lang/String;Ljava/lang/String;)Z")};
|
||||||
bool returnValue {static_cast<bool>(jniEnv->CallStaticBooleanMethod(
|
bool returnValue {static_cast<bool>(jniEnv->CallStaticBooleanMethod(
|
||||||
|
@ -406,7 +406,7 @@ namespace Utils
|
||||||
std::vector<std::pair<std::string, std::string>>& extras)
|
std::vector<std::pair<std::string, std::string>>& extras)
|
||||||
{
|
{
|
||||||
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
JNIEnv* jniEnv {reinterpret_cast<JNIEnv*>(SDL_AndroidGetJNIEnv())};
|
||||||
jclass jniClass {jniEnv->FindClass("org/esde/esde/esde")};
|
jclass jniClass {jniEnv->FindClass("org/es_de/frontend/MainActivity")};
|
||||||
jmethodID methodID {
|
jmethodID methodID {
|
||||||
jniEnv->GetStaticMethodID(jniClass, "launchGame",
|
jniEnv->GetStaticMethodID(jniClass, "launchGame",
|
||||||
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/"
|
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// ES-DE
|
||||||
// Platform.h
|
// Platform.h
|
||||||
//
|
//
|
||||||
// Platform utility functions.
|
// Platform utility functions.
|
||||||
|
|
Loading…
Reference in a new issue