Fixed clang skill issue

This commit is contained in:
OpenSauce04 2024-03-31 19:35:50 +01:00
parent f12b649194
commit a0db384339
7 changed files with 112 additions and 112 deletions

View File

@ -69,8 +69,8 @@ void InitJNI(JNIEnv* env) {
env->NewGlobalRef(env->FindClass("io/github/lime3ds/applets/MiiSelector")));
s_mii_selector_config_class = reinterpret_cast<jclass>(env->NewGlobalRef(
env->FindClass("io/github/lime3ds/applets/MiiSelector$MiiSelectorConfig")));
s_mii_selector_data_class = reinterpret_cast<jclass>(env->NewGlobalRef(
env->FindClass("io/github/lime3ds/applets/MiiSelector$MiiSelectorData")));
s_mii_selector_data_class = reinterpret_cast<jclass>(
env->NewGlobalRef(env->FindClass("io/github/lime3ds/applets/MiiSelector$MiiSelectorData")));
s_mii_selector_execute =
env->GetStaticMethodID(s_mii_selector_class, "Execute",

View File

@ -124,8 +124,7 @@ jobject ToJavaValidationError(Frontend::ValidationError error) {
"Lio/github/lime3ds/applets/SoftwareKeyboard$ValidationError;"));
}
jobject Java_io_github_lime3ds_applets_SoftwareKeyboard_ValidateFilters(JNIEnv* env,
jclass clazz,
jobject Java_io_github_lime3ds_applets_SoftwareKeyboard_ValidateFilters(JNIEnv* env, jclass clazz,
jstring text) {
const auto ret =

View File

@ -34,18 +34,18 @@ JNIEXPORT void JNICALL Java_io_github_lime3ds_features_cheats_model_Cheat_finali
delete CheatFromJava(env, obj);
}
JNIEXPORT jstring JNICALL
Java_io_github_lime3ds_features_cheats_model_Cheat_getName(JNIEnv* env, jobject obj) {
JNIEXPORT jstring JNICALL Java_io_github_lime3ds_features_cheats_model_Cheat_getName(JNIEnv* env,
jobject obj) {
return ToJString(env, (*CheatFromJava(env, obj))->GetName());
}
JNIEXPORT jstring JNICALL
Java_io_github_lime3ds_features_cheats_model_Cheat_getNotes(JNIEnv* env, jobject obj) {
JNIEXPORT jstring JNICALL Java_io_github_lime3ds_features_cheats_model_Cheat_getNotes(JNIEnv* env,
jobject obj) {
return ToJString(env, (*CheatFromJava(env, obj))->GetComments());
}
JNIEXPORT jstring JNICALL
Java_io_github_lime3ds_features_cheats_model_Cheat_getCode(JNIEnv* env, jobject obj) {
JNIEXPORT jstring JNICALL Java_io_github_lime3ds_features_cheats_model_Cheat_getCode(JNIEnv* env,
jobject obj) {
return ToJString(env, (*CheatFromJava(env, obj))->GetCode());
}

View File

@ -148,8 +148,7 @@ jintArray Java_io_github_lime3ds_model_GameInfo_getIcon(JNIEnv* env, jobject obj
return icon;
}
jboolean Java_io_github_lime3ds_model_GameInfo_getIsVisibleSystemTitle(JNIEnv* env,
jobject obj) {
jboolean Java_io_github_lime3ds_model_GameInfo_getIsVisibleSystemTitle(JNIEnv* env, jobject obj) {
Loader::SMDH* smdh = GetPointer(env, obj);
if (smdh == nullptr) {
return false;

View File

@ -168,8 +168,8 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
// Initialize NativeLibrary
const jclass native_library_class = env->FindClass("io/github/lime3ds/NativeLibrary");
s_native_library_class = reinterpret_cast<jclass>(env->NewGlobalRef(native_library_class));
s_on_core_error = env->GetStaticMethodID(
s_native_library_class, "onCoreError",
s_on_core_error =
env->GetStaticMethodID(s_native_library_class, "onCoreError",
"(Lio/github/lime3ds/NativeLibrary$CoreError;Ljava/lang/String;)Z");
s_is_portrait_mode = env->GetStaticMethodID(s_native_library_class, "isPortraitMode", "()Z");
s_landscape_screen_layout =

View File

@ -287,8 +287,7 @@ void InitializeGpuDriver(const std::string& hook_lib_dir, const std::string& cus
extern "C" {
void Java_io_github_lime3ds_NativeLibrary_surfaceChanged(JNIEnv* env,
[[maybe_unused]] jobject obj,
void Java_io_github_lime3ds_NativeLibrary_surfaceChanged(JNIEnv* env, [[maybe_unused]] jobject obj,
jobject surf) {
s_surf = ANativeWindow_fromSurface(env, surf);
@ -321,9 +320,11 @@ void Java_io_github_lime3ds_NativeLibrary_doFrame([[maybe_unused]] JNIEnv* env,
window->TryPresenting();
}
void JNICALL Java_io_github_lime3ds_NativeLibrary_initializeGpuDriver(
JNIEnv* env, jobject obj, jstring hook_lib_dir, jstring custom_driver_dir,
jstring custom_driver_name, jstring file_redirect_dir) {
void JNICALL Java_io_github_lime3ds_NativeLibrary_initializeGpuDriver(JNIEnv* env, jobject obj,
jstring hook_lib_dir,
jstring custom_driver_dir,
jstring custom_driver_name,
jstring file_redirect_dir) {
InitializeGpuDriver(GetJString(env, hook_lib_dir), GetJString(env, custom_driver_dir),
GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir));
}
@ -416,8 +417,7 @@ jobjectArray Java_io_github_lime3ds_NativeLibrary_getInstalledGamePaths(
jlongArray Java_io_github_lime3ds_NativeLibrary_getSystemTitleIds(JNIEnv* env,
[[maybe_unused]] jobject obj,
jint system_type,
jint region) {
jint system_type, jint region) {
const auto mode = static_cast<Core::SystemTitleSet>(system_type);
const std::vector<u64> titles = Core::GetSystemTitleIds(mode, region);
jlongArray jTitles = env->NewLongArray(titles.size());
@ -505,8 +505,9 @@ jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadEvent([[maybe_unused]] JN
return static_cast<jboolean>(consumed);
}
jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadMoveEvent(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj, [[maybe_unused]] jstring j_device,
jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadMoveEvent([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj,
[[maybe_unused]] jstring j_device,
jint axis, jfloat x, jfloat y) {
// Clamp joystick movement to supported minimum and maximum
// Citra uses an inverted y axis sent by the frontend
@ -524,17 +525,17 @@ jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadMoveEvent(
return static_cast<jboolean>(InputManager::AnalogHandler()->MoveJoystick(axis, x, y));
}
jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadAxisEvent(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj, [[maybe_unused]] jstring j_device,
jboolean Java_io_github_lime3ds_NativeLibrary_onGamePadAxisEvent([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj,
[[maybe_unused]] jstring j_device,
jint axis_id, jfloat axis_val) {
return static_cast<jboolean>(
InputManager::ButtonHandler()->AnalogButtonEvent(axis_id, axis_val));
}
jboolean Java_io_github_lime3ds_NativeLibrary_onTouchEvent([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj,
jfloat x, jfloat y,
jboolean pressed) {
[[maybe_unused]] jobject obj, jfloat x,
jfloat y, jboolean pressed) {
return static_cast<jboolean>(
window->OnTouchEvent(static_cast<int>(x + 0.5), static_cast<int>(y + 0.5), pressed));
}
@ -650,8 +651,7 @@ void Java_io_github_lime3ds_NativeLibrary_reloadCameraDevices([[maybe_unused]] J
}
}
jboolean Java_io_github_lime3ds_NativeLibrary_loadAmiibo(JNIEnv* env,
[[maybe_unused]] jobject obj,
jboolean Java_io_github_lime3ds_NativeLibrary_loadAmiibo(JNIEnv* env, [[maybe_unused]] jobject obj,
jstring j_file) {
std::string filepath = GetJString(env, j_file);
Core::System& system{Core::System::GetInstance()};
@ -676,8 +676,9 @@ void Java_io_github_lime3ds_NativeLibrary_removeAmiibo([[maybe_unused]] JNIEnv*
nfc->RemoveAmiibo();
}
JNIEXPORT jobject JNICALL Java_io_github_lime3ds_utils_CiaInstallWorker_installCIA(
JNIEnv* env, jobject jobj, jstring jpath) {
JNIEXPORT jobject JNICALL Java_io_github_lime3ds_utils_CiaInstallWorker_installCIA(JNIEnv* env,
jobject jobj,
jstring jpath) {
std::string path = GetJString(env, jpath);
Service::AM::InstallStatus res = Service::AM::InstallCIA(
path, [env, jobj](std::size_t total_bytes_read, std::size_t file_size) {
@ -688,8 +689,8 @@ JNIEXPORT jobject JNICALL Java_io_github_lime3ds_utils_CiaInstallWorker_installC
return IDCache::GetJavaCiaInstallStatus(res);
}
jobjectArray Java_io_github_lime3ds_NativeLibrary_getSavestateInfo(
JNIEnv* env, [[maybe_unused]] jobject obj) {
jobjectArray Java_io_github_lime3ds_NativeLibrary_getSavestateInfo(JNIEnv* env,
[[maybe_unused]] jobject obj) {
const jclass date_class = env->FindClass("java/util/Date");
const auto date_constructor = env->GetMethodID(date_class, "<init>", "(J)V");

View File

@ -27,8 +27,9 @@ jboolean Java_io_github_lime3ds_utils_SystemSaveGame_getIsSystemSetupNeeded(
return cfg->IsSystemSetupNeeded();
}
void Java_io_github_lime3ds_utils_SystemSaveGame_setSystemSetupNeeded(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj, jboolean needed) {
void Java_io_github_lime3ds_utils_SystemSaveGame_setSystemSetupNeeded([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj,
jboolean needed) {
cfg->SetSystemSetupNeeded(needed);
}
@ -43,8 +44,8 @@ void Java_io_github_lime3ds_utils_SystemSaveGame_setUsername([[maybe_unused]] JN
cfg->SetUsername(Common::UTF8ToUTF16(GetJString(env, username)));
}
jshortArray Java_io_github_lime3ds_utils_SystemSaveGame_getBirthday(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
jshortArray Java_io_github_lime3ds_utils_SystemSaveGame_getBirthday([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) {
jshortArray jbirthdayArray = env->NewShortArray(2);
auto birthday = cfg->GetBirthday();
jshort birthdayArray[2]{static_cast<jshort>(get<0>(birthday)),
@ -59,8 +60,8 @@ void Java_io_github_lime3ds_utils_SystemSaveGame_setBirthday([[maybe_unused]] JN
cfg->SetBirthday(static_cast<u8>(jmonth), static_cast<u8>(jday));
}
jint Java_io_github_lime3ds_utils_SystemSaveGame_getSystemLanguage(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
jint Java_io_github_lime3ds_utils_SystemSaveGame_getSystemLanguage([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) {
return cfg->GetSystemLanguage();
}
@ -70,8 +71,8 @@ void Java_io_github_lime3ds_utils_SystemSaveGame_setSystemLanguage([[maybe_unuse
cfg->SetSystemLanguage(static_cast<Service::CFG::SystemLanguage>(jsystemLanguage));
}
jint Java_io_github_lime3ds_utils_SystemSaveGame_getSoundOutputMode(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
jint Java_io_github_lime3ds_utils_SystemSaveGame_getSoundOutputMode([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) {
return cfg->GetSoundOutputMode();
}
@ -108,8 +109,8 @@ jlong Java_io_github_lime3ds_utils_SystemSaveGame_getConsoleId([[maybe_unused]]
return cfg->GetConsoleUniqueId();
}
void Java_io_github_lime3ds_utils_SystemSaveGame_regenerateConsoleId(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
void Java_io_github_lime3ds_utils_SystemSaveGame_regenerateConsoleId([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) {
const auto [random_number, console_id] = cfg->GenerateConsoleUniqueId();
cfg->SetConsoleUniqueId(random_number, console_id);
cfg->UpdateConfigNANDSavegame();