mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-12-16 12:08:49 +00:00
Applied clang-format and updated license headers
This commit is contained in:
parent
c13a122527
commit
52811bc4a9
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Citra Emulator Project
|
// Copyright Citra Emulator Project / Azahar Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Citra Emulator Project
|
// Copyright Citra Emulator Project / Azahar Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
@ -152,9 +152,11 @@ std::vector<std::string> GetFilesName(const std::string& filepath) {
|
|||||||
|
|
||||||
std::string GetUserDirectory() {
|
std::string GetUserDirectory() {
|
||||||
if (get_user_directory == nullptr)
|
if (get_user_directory == nullptr)
|
||||||
throw std::runtime_error("Unable to locate user directory: Function with ID 'get_user_directory' is missing");
|
throw std::runtime_error(
|
||||||
|
"Unable to locate user directory: Function with ID 'get_user_directory' is missing");
|
||||||
auto env = GetEnvForThread();
|
auto env = GetEnvForThread();
|
||||||
auto j_user_directory = (jstring)(env->CallStaticObjectMethod(native_library, get_user_directory));
|
auto j_user_directory =
|
||||||
|
(jstring)(env->CallStaticObjectMethod(native_library, get_user_directory));
|
||||||
return env->GetStringUTFChars(j_user_directory, nullptr);
|
return env->GetStringUTFChars(j_user_directory, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Citra Emulator Project
|
// Copyright Citra Emulator Project / Azahar Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
V(GetFilesName, std::vector<std::string>, (const std::string& filepath), get_files_name, \
|
V(GetFilesName, std::vector<std::string>, (const std::string& filepath), get_files_name, \
|
||||||
"getFilesName", "(Ljava/lang/String;)[Ljava/lang/String;") \
|
"getFilesName", "(Ljava/lang/String;)[Ljava/lang/String;") \
|
||||||
V(GetUserDirectory, std::string, (), get_user_directory, "getUserDirectory", \
|
V(GetUserDirectory, std::string, (), get_user_directory, "getUserDirectory", \
|
||||||
"()Ljava/lang/String;") \
|
"()Ljava/lang/String;") \
|
||||||
V(CopyFile, bool, \
|
V(CopyFile, bool, \
|
||||||
(const std::string& source, const std::string& destination_path, \
|
(const std::string& source, const std::string& destination_path, \
|
||||||
const std::string& destination_filename), \
|
const std::string& destination_filename), \
|
||||||
|
|||||||
@ -312,8 +312,8 @@ bool Rename(const std::string& srcFilename, const std::string& destFilename) {
|
|||||||
return true;
|
return true;
|
||||||
#elif ANDROID
|
#elif ANDROID
|
||||||
const std::string userDirLocation = AndroidStorage::GetUserDirectory();
|
const std::string userDirLocation = AndroidStorage::GetUserDirectory();
|
||||||
if (rename((userDirLocation + srcFilename).c_str(),
|
if (rename((userDirLocation + srcFilename).c_str(), (userDirLocation + destFilename).c_str()) ==
|
||||||
(userDirLocation + destFilename).c_str()) == 0)
|
0)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
if (rename(srcFilename.c_str(), destFilename.c_str()) == 0)
|
if (rename(srcFilename.c_str(), destFilename.c_str()) == 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user