Merge pull request #9228 from JosJuice/android-jclass
Android: Fix jobject/jclass warnings
This commit is contained in:
commit
418f9faa9d
|
@ -8,8 +8,6 @@
|
|||
|
||||
namespace IDCache
|
||||
{
|
||||
static constexpr jint JNI_VERSION = JNI_VERSION_1_6;
|
||||
|
||||
JNIEnv* GetEnvForThread();
|
||||
|
||||
jclass GetNativeLibraryClass();
|
||||
|
|
|
@ -187,8 +187,7 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getBannerHe
|
|||
return static_cast<jint>(GetRef(env, obj)->GetBannerImage().height);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_parse(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_parse(JNIEnv* env, jclass,
|
||||
jstring path)
|
||||
{
|
||||
auto game_file = std::make_shared<UICommon::GameFile>(GetJString(env, path));
|
||||
|
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_newGameFileCache(
|
||||
JNIEnv* env, jobject obj, jstring path)
|
||||
JNIEnv* env, jclass, jstring path)
|
||||
{
|
||||
return reinterpret_cast<jlong>(new UICommon::GameFileCache(GetJString(env, path)));
|
||||
}
|
||||
|
|
|
@ -232,13 +232,13 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_utils_IniFile_finalize(JNI
|
|||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_utils_IniFile_newIniFile(JNIEnv* env,
|
||||
jobject obj)
|
||||
jobject)
|
||||
{
|
||||
return reinterpret_cast<jlong>(new IniFile);
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_utils_IniFile_copyIniFile(JNIEnv* env,
|
||||
jobject obj,
|
||||
jobject,
|
||||
jobject other)
|
||||
{
|
||||
return reinterpret_cast<jlong>(new IniFile(*GetIniFilePointer(env, other)));
|
||||
|
|
|
@ -71,7 +71,6 @@ namespace
|
|||
constexpr char DOLPHIN_TAG[] = "DolphinEmuNative";
|
||||
|
||||
ANativeWindow* s_surf;
|
||||
IniFile s_ini;
|
||||
|
||||
// The Core only supports using a single Host thread.
|
||||
// If multiple threads want to call host functions then they need to queue
|
||||
|
@ -196,22 +195,20 @@ static std::string GetAnalyticValue(const std::string& key)
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SetState(Core::State::Running);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv*, jclass)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SetState(Core::State::Paused);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv*, jclass)
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
|
@ -226,81 +223,72 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulatio
|
|||
s_emulation_end_event.Wait();
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsBooting(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsBooting(JNIEnv*, jclass)
|
||||
{
|
||||
return static_cast<jboolean>(Core::IsBooting());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_WaitUntilDoneBooting(JNIEnv* env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WaitUntilDoneBooting(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
Core::WaitUntilDoneBooting();
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunning(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunning(JNIEnv*, jclass)
|
||||
{
|
||||
return Core::IsRunning();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring jFile);
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Button, jint Action)
|
||||
JNIEnv* env, jclass, jstring jDevice, jint Button, jint Action)
|
||||
{
|
||||
return ButtonManager::GamepadEvent(GetJString(env, jDevice), Button, Action);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Axis, jfloat Value)
|
||||
JNIEnv* env, jclass, jstring jDevice, jint Axis, jfloat Value)
|
||||
{
|
||||
ButtonManager::GamepadAxisEvent(GetJString(env, jDevice), Axis, Value);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSensorsEnabled(
|
||||
JNIEnv* env, jobject obj, jboolean accelerometer_enabled, jboolean gyroscope_enabled)
|
||||
JNIEnv*, jclass, jboolean accelerometer_enabled, jboolean gyroscope_enabled)
|
||||
{
|
||||
ciface::Android::SetMotionSensorsEnabled(accelerometer_enabled, gyroscope_enabled);
|
||||
}
|
||||
|
||||
JNIEXPORT double JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetInputRadiusAtAngle(
|
||||
JNIEnv* env, jobject obj, int emu_pad_id, int stick, double angle)
|
||||
JNIEnv*, jclass, int emu_pad_id, int stick, double angle)
|
||||
{
|
||||
const auto casted_stick = static_cast<ButtonManager::ButtonType>(stick);
|
||||
return ButtonManager::GetInputRadiusAtAngle(emu_pad_id, casted_stick, angle);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env,
|
||||
jobject obj)
|
||||
jclass)
|
||||
{
|
||||
return ToJString(env, Common::scm_rev_str);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGitRevision(JNIEnv* env,
|
||||
jobject obj)
|
||||
jclass)
|
||||
{
|
||||
return ToJString(env, Common::scm_rev_git_str);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv*, jclass)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
Core::SaveScreenShot();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv*, jclass,
|
||||
jint api)
|
||||
{
|
||||
eglBindAPI(api);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv*, jclass,
|
||||
jint slot,
|
||||
jboolean wait)
|
||||
{
|
||||
|
@ -308,8 +296,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JN
|
|||
State::Save(slot, wait);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(JNIEnv* env, jclass,
|
||||
jstring path,
|
||||
jboolean wait)
|
||||
{
|
||||
|
@ -317,82 +304,76 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(
|
|||
State::SaveAs(GetJString(env, path), wait);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv*, jclass,
|
||||
jint slot)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
State::Load(slot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadStateAs(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadStateAs(JNIEnv* env, jclass,
|
||||
jstring path)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
State::LoadAs(GetJString(env, path));
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUnixTimeOfStateSlot(
|
||||
JNIEnv* env, jobject obj, jint slot)
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUnixTimeOfStateSlot(JNIEnv*, jclass, jint slot)
|
||||
{
|
||||
return static_cast<jlong>(State::GetUnixTimeOfSlot(slot));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_utils_DirectoryInitialization_SetSysDirectory(
|
||||
JNIEnv* env, jobject obj, jstring jPath)
|
||||
JNIEnv* env, jclass, jstring jPath)
|
||||
{
|
||||
const std::string path = GetJString(env, jPath);
|
||||
File::SetSysDirectory(path);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_utils_DirectoryInitialization_CreateUserDirectories(JNIEnv* env,
|
||||
jobject obj)
|
||||
Java_org_dolphinemu_dolphinemu_utils_DirectoryInitialization_CreateUserDirectories(JNIEnv*, jclass)
|
||||
{
|
||||
UICommon::CreateDirectories();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(
|
||||
JNIEnv* env, jobject obj, jstring jDirectory)
|
||||
JNIEnv* env, jclass, jstring jDirectory)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
UICommon::SetUserDirectory(GetJString(env, jDirectory));
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env,
|
||||
jobject obj)
|
||||
jclass)
|
||||
{
|
||||
return ToJString(env, File::GetUserPath(D_USER_IDX));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetCacheDirectory(
|
||||
JNIEnv* env, jobject obj, jstring jDirectory)
|
||||
JNIEnv* env, jclass, jstring jDirectory)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
File::SetUserPath(D_CACHE_IDX, GetJString(env, jDirectory) + DIR_SEP);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_DefaultCPUCore(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_DefaultCPUCore(JNIEnv*, jclass)
|
||||
{
|
||||
return static_cast<jint>(PowerPC::DefaultCPUCore());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDefaultGraphicsBackendName(JNIEnv* env, jobject obj)
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDefaultGraphicsBackendName(JNIEnv* env, jclass)
|
||||
{
|
||||
return ToJString(env, VideoBackendBase::GetDefaultBackendName());
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetMaxLogLevel(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetMaxLogLevel(JNIEnv*, jclass)
|
||||
{
|
||||
return static_cast<jint>(MAX_LOGLEVEL);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv*, jclass,
|
||||
jboolean enable)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
|
@ -403,8 +384,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling
|
|||
Core::SetState(Core::State::Running);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt";
|
||||
|
@ -414,7 +395,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfile
|
|||
|
||||
// Surface Handling
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChanged(JNIEnv* env,
|
||||
jobject obj,
|
||||
jclass,
|
||||
jobject surf)
|
||||
{
|
||||
s_surf = ANativeWindow_fromSurface(env, surf);
|
||||
|
@ -425,8 +406,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChang
|
|||
g_renderer->ChangeSurface(s_surf);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestroyed(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
if (g_renderer)
|
||||
g_renderer->ChangeSurface(nullptr);
|
||||
|
@ -438,34 +419,32 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr
|
|||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jfloat JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameAspectRatio(JNIEnv* env, jobject obj)
|
||||
JNIEXPORT jfloat JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameAspectRatio(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
return g_renderer->CalculateDrawAspectRatio();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv*, jclass)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||
WiimoteReal::Refresh();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadWiimoteConfig(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadWiimoteConfig(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
WiimoteReal::LoadSettings();
|
||||
Wiimote::LoadConfig();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadConfig(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadConfig(JNIEnv*, jclass)
|
||||
{
|
||||
SConfig::GetInstance().LoadSettings();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_UpdateGCAdapterScanThread(JNIEnv* env, jobject obj)
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_UpdateGCAdapterScanThread(JNIEnv*, jclass)
|
||||
{
|
||||
if (GCAdapter::UseAdapter())
|
||||
{
|
||||
|
@ -477,8 +456,7 @@ Java_org_dolphinemu_dolphinemu_NativeLibrary_UpdateGCAdapterScanThread(JNIEnv* e
|
|||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(JNIEnv*, jclass)
|
||||
{
|
||||
Common::RegisterMsgAlertHandler(&MsgAlert);
|
||||
Common::AndroidSetReportHandler(&ReportSend);
|
||||
|
@ -486,8 +464,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J
|
|||
UICommon::Init();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv* env, jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
DolphinAnalytics::Instance().ReportDolphinStart(GetAnalyticValue("DEVICE_TYPE"));
|
||||
}
|
||||
|
@ -559,20 +537,19 @@ static void Run(JNIEnv* env, const std::vector<std::string>& paths,
|
|||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run___3Ljava_lang_String_2(
|
||||
JNIEnv* env, jobject obj, jobjectArray jPaths)
|
||||
JNIEnv* env, jclass, jobjectArray jPaths)
|
||||
{
|
||||
Run(env, JStringArrayToVector(env, jPaths));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_Run___3Ljava_lang_String_2Ljava_lang_String_2Z(
|
||||
JNIEnv* env, jobject obj, jobjectArray jPaths, jstring jSavestate, jboolean jDeleteSavestate)
|
||||
JNIEnv* env, jclass, jobjectArray jPaths, jstring jSavestate, jboolean jDeleteSavestate)
|
||||
{
|
||||
Run(env, JStringArrayToVector(env, jPaths), GetJString(env, jSavestate), jDeleteSavestate);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(JNIEnv* env,
|
||||
jobject obj,
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(JNIEnv* env, jclass,
|
||||
jstring jFile)
|
||||
{
|
||||
const std::string path = GetJString(env, jFile);
|
||||
|
@ -581,7 +558,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(J
|
|||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetLogTypeNames(JNIEnv* env,
|
||||
jobject obj)
|
||||
jclass)
|
||||
{
|
||||
std::map<std::string, std::string> map = Common::Log::LogManager::GetInstance()->GetLogTypes();
|
||||
|
||||
|
@ -596,14 +573,14 @@ JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetLogTyp
|
|||
return linked_hash_map;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadLoggerConfig(JNIEnv* env,
|
||||
jobject obj)
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadLoggerConfig(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
Common::Log::LogManager::Init();
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_InstallWAD(JNIEnv* env,
|
||||
jobject obj,
|
||||
jclass,
|
||||
jstring jFile)
|
||||
{
|
||||
const std::string path = GetJString(env, jFile);
|
||||
|
@ -611,7 +588,7 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_InstallW
|
|||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ConvertDiscImage(
|
||||
JNIEnv* env, jobject obj, jstring jInPath, jstring jOutPath, jint jPlatform, jint jFormat,
|
||||
JNIEnv* env, jclass, jstring jInPath, jstring jOutPath, jint jPlatform, jint jFormat,
|
||||
jint jBlockSize, jint jCompression, jint jCompressionLevel, jboolean jScrub, jobject jCallback)
|
||||
{
|
||||
const std::string in_path = GetJString(env, jInPath);
|
||||
|
@ -670,46 +647,46 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ConvertD
|
|||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_FormatSize(JNIEnv* env,
|
||||
jobject obj,
|
||||
jclass,
|
||||
jlong bytes,
|
||||
jint decimals)
|
||||
{
|
||||
return ToJString(env, UICommon::FormatSize(bytes, decimals));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetObscuredPixelsLeft(
|
||||
JNIEnv* env, jobject obj, jint width)
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_SetObscuredPixelsLeft(JNIEnv*, jclass, jint width)
|
||||
{
|
||||
OSD::SetObscuredPixelsLeft(width);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetObscuredPixelsTop(
|
||||
JNIEnv* env, jobject obj, jint height)
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_SetObscuredPixelsTop(JNIEnv*, jclass, jint height)
|
||||
{
|
||||
OSD::SetObscuredPixelsTop(height);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_IsGameMetadataValid(JNIEnv* env, jobject obj)
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsGameMetadataValid(JNIEnv*,
|
||||
jclass)
|
||||
{
|
||||
return s_game_metadata_is_valid;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_IsEmulatingWiiUnchecked(JNIEnv* env, jobject obj)
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_IsEmulatingWiiUnchecked(JNIEnv*, jclass)
|
||||
{
|
||||
return SConfig::GetInstance().bWii;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCurrentGameIDUnchecked(JNIEnv* env, jobject obj)
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCurrentGameIDUnchecked(JNIEnv* env, jclass)
|
||||
{
|
||||
return ToJString(env, SConfig::GetInstance().GetGameID());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCurrentTitleDescriptionUnchecked(JNIEnv* env,
|
||||
jobject obj)
|
||||
jclass)
|
||||
{
|
||||
// Prefer showing just the name. If no name is available, show just the game ID.
|
||||
std::string description = SConfig::GetInstance().GetTitleName();
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_isSettingSaveable(
|
||||
JNIEnv* env, jclass obj, jstring file, jstring section, jstring key)
|
||||
JNIEnv* env, jclass, jstring file, jstring section, jstring key)
|
||||
{
|
||||
const Config::Location location = GetLocation(env, file, section, key);
|
||||
return static_cast<jboolean>(ConfigLoaders::IsSettingSaveable(location));
|
||||
|
@ -103,7 +103,7 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_isSettingSav
|
|||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_loadGameInis(JNIEnv* env,
|
||||
jclass obj,
|
||||
jclass,
|
||||
jstring jGameId,
|
||||
jint jRevision)
|
||||
{
|
||||
|
@ -114,22 +114,21 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_loadGameInis
|
|||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_unloadGameInis(JNIEnv* env,
|
||||
jclass obj)
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_unloadGameInis(JNIEnv*, jclass)
|
||||
{
|
||||
Config::RemoveLayer(Config::LayerType::GlobalGame);
|
||||
Config::RemoveLayer(Config::LayerType::LocalGame);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_save(
|
||||
JNIEnv* env, jclass obj, jint layer)
|
||||
JNIEnv*, jclass, jint layer)
|
||||
{
|
||||
return GetLayer(layer, {})->Save();
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_isOverridden(
|
||||
JNIEnv* env, jclass obj, jstring file, jstring section, jstring key)
|
||||
JNIEnv* env, jclass, jstring file, jstring section, jstring key)
|
||||
{
|
||||
const Config::Location location = GetLocation(env, file, section, key);
|
||||
const bool result = Config::GetActiveLayerForConfig(location) != Config::LayerType::Base;
|
||||
|
@ -138,7 +137,7 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_isOverridden
|
|||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_deleteKey(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key)
|
||||
{
|
||||
const Config::Location location = GetLocation(env, file, section, key);
|
||||
return static_cast<jboolean>(GetLayer(layer, location)->DeleteKey(location));
|
||||
|
@ -146,7 +145,7 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_deleteKey(
|
|||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getString(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key,
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key,
|
||||
jstring default_value)
|
||||
{
|
||||
const Config::Location location = GetLocation(env, file, section, key);
|
||||
|
@ -155,7 +154,7 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getString(
|
|||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getBoolean(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key,
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key,
|
||||
jboolean default_value)
|
||||
{
|
||||
const Config::Location location = GetLocation(env, file, section, key);
|
||||
|
@ -163,15 +162,14 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getBoolean(
|
|||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getInt(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key,
|
||||
jint default_value)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, jint default_value)
|
||||
{
|
||||
return Get(layer, GetLocation(env, file, section, key), default_value);
|
||||
}
|
||||
|
||||
JNIEXPORT jfloat JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getFloat(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key,
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key,
|
||||
jfloat default_value)
|
||||
{
|
||||
return Get(layer, GetLocation(env, file, section, key), default_value);
|
||||
|
@ -179,26 +177,26 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getFloat(
|
|||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_setString(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key, jstring value)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, jstring value)
|
||||
{
|
||||
return Set(layer, GetLocation(env, file, section, key), GetJString(env, value));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_setBoolean(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key, jboolean value)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, jboolean value)
|
||||
{
|
||||
return Set(layer, GetLocation(env, file, section, key), static_cast<bool>(value));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_setInt(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key, jint value)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, jint value)
|
||||
{
|
||||
return Set(layer, GetLocation(env, file, section, key), value);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_setFloat(
|
||||
JNIEnv* env, jclass obj, jint layer, jstring file, jstring section, jstring key, jfloat value)
|
||||
JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, jfloat value)
|
||||
{
|
||||
return Set(layer, GetLocation(env, file, section, key), value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue