mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Disables state loading and emulation speeds below 100% when RetroAchievements hardcore mode is enabled.
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
// Copyright 2025 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include <jni.h>
|
|
|
|
#include "Core/AchievementManager.h"
|
|
#include "jni/AndroidCommon/AndroidCommon.h"
|
|
|
|
extern "C" {
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_org_dolphinemu_dolphinemu_features_settings_model_AchievementModel_init(JNIEnv* env, jclass)
|
|
{
|
|
AchievementManager::GetInstance().Init(nullptr);
|
|
}
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_org_dolphinemu_dolphinemu_features_settings_model_AchievementModel_login(JNIEnv* env, jclass,
|
|
jstring password)
|
|
{
|
|
AchievementManager::GetInstance().Login(GetJString(env, password));
|
|
}
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_org_dolphinemu_dolphinemu_features_settings_model_AchievementModel_logout(JNIEnv* env, jclass)
|
|
{
|
|
AchievementManager::GetInstance().Logout();
|
|
}
|
|
|
|
JNIEXPORT jboolean JNICALL
|
|
Java_org_dolphinemu_dolphinemu_features_settings_model_AchievementModel_isHardcoreModeActive(
|
|
JNIEnv* env, jclass)
|
|
{
|
|
return AchievementManager::GetInstance().IsHardcoreModeActive();
|
|
}
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_org_dolphinemu_dolphinemu_features_settings_model_AchievementModel_shutdown(JNIEnv* env,
|
|
jclass)
|
|
{
|
|
AchievementManager::GetInstance().Shutdown();
|
|
}
|
|
|
|
} // extern "C"
|