MainAndroid: Use JNI_FALSE instead of static_cast<jboolean>(false)

This commit is contained in:
mitaclaw 2024-07-27 20:22:25 -07:00
parent 5f4f974b48
commit 7cafd78ffc
1 changed files with 4 additions and 5 deletions

View File

@ -420,8 +420,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteJitBloc
if (jit_interface.GetCore() == nullptr) if (jit_interface.GetCore() == nullptr)
{ {
env->CallStaticVoidMethod(native_library_class, IDCache::GetDisplayToastMsg(), env->CallStaticVoidMethod(native_library_class, IDCache::GetDisplayToastMsg(),
ToJString(env, Common::GetStringT("JIT is not active")), ToJString(env, Common::GetStringT("JIT is not active")), JNI_FALSE);
static_cast<jboolean>(false));
return; return;
} }
const std::string filename = fmt::format("{}{}.txt", File::GetUserPath(D_DUMPDEBUG_JITBLOCKS_IDX), const std::string filename = fmt::format("{}{}.txt", File::GetUserPath(D_DUMPDEBUG_JITBLOCKS_IDX),
@ -432,13 +431,13 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteJitBloc
env->CallStaticVoidMethod( env->CallStaticVoidMethod(
native_library_class, IDCache::GetDisplayToastMsg(), native_library_class, IDCache::GetDisplayToastMsg(),
ToJString(env, Common::FmtFormatT("Failed to open \"{0}\" for writing.", filename)), ToJString(env, Common::FmtFormatT("Failed to open \"{0}\" for writing.", filename)),
static_cast<jboolean>(false)); JNI_FALSE);
return; return;
} }
jit_interface.JitBlockLogDump(Core::CPUThreadGuard{system}, f.GetHandle()); jit_interface.JitBlockLogDump(Core::CPUThreadGuard{system}, f.GetHandle());
env->CallStaticVoidMethod(native_library_class, IDCache::GetDisplayToastMsg(), env->CallStaticVoidMethod(native_library_class, IDCache::GetDisplayToastMsg(),
ToJString(env, Common::FmtFormatT("Wrote to \"{0}\".", filename)), ToJString(env, Common::FmtFormatT("Wrote to \"{0}\".", filename)),
static_cast<jboolean>(false)); JNI_FALSE);
} }
// Surface Handling // Surface Handling
@ -701,7 +700,7 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ConvertD
blob_reader = DiscIO::CreateBlobReader(in_path); blob_reader = DiscIO::CreateBlobReader(in_path);
if (!blob_reader) if (!blob_reader)
return static_cast<jboolean>(false); return JNI_FALSE;
jobject jCallbackGlobal = env->NewGlobalRef(jCallback); jobject jCallbackGlobal = env->NewGlobalRef(jCallback);
Common::ScopeGuard scope_guard([jCallbackGlobal, env] { env->DeleteGlobalRef(jCallbackGlobal); }); Common::ScopeGuard scope_guard([jCallbackGlobal, env] { env->DeleteGlobalRef(jCallbackGlobal); });