Compare commits
8 Commits
android-48
...
android-50
Author | SHA1 | Date | |
---|---|---|---|
808e285985 | |||
7d89f2c146 | |||
51ffc2c66c | |||
e41655960e | |||
ccd163ab2c | |||
182fb83556 | |||
35b77b9599 | |||
0cd9d51e06 |
@ -1,3 +1,11 @@
|
|||||||
|
| Pull Request | Commit | Title | Author | Merged? |
|
||||||
|
|----|----|----|----|----|
|
||||||
|
|
||||||
|
|
||||||
|
End of merge log. You can find the original README.md below the break.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
@ -95,6 +95,7 @@ android {
|
|||||||
// builds a release build that doesn't need signing
|
// builds a release build that doesn't need signing
|
||||||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||||
register("relWithDebInfo") {
|
register("relWithDebInfo") {
|
||||||
|
isDefault = true
|
||||||
resValue("string", "app_name_suffixed", "yuzu Debug Release")
|
resValue("string", "app_name_suffixed", "yuzu Debug Release")
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
@ -122,6 +123,7 @@ android {
|
|||||||
flavorDimensions.add("version")
|
flavorDimensions.add("version")
|
||||||
productFlavors {
|
productFlavors {
|
||||||
create("mainline") {
|
create("mainline") {
|
||||||
|
isDefault = true
|
||||||
dimension = "version"
|
dimension = "version"
|
||||||
buildConfigField("Boolean", "PREMIUM", "false")
|
buildConfigField("Boolean", "PREMIUM", "false")
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import kotlinx.serialization.json.Json
|
|||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import org.yuzu.yuzu_emu.YuzuApplication
|
import org.yuzu.yuzu_emu.YuzuApplication
|
||||||
import org.yuzu.yuzu_emu.model.Game
|
import org.yuzu.yuzu_emu.model.Game
|
||||||
|
import org.yuzu.yuzu_emu.model.MinimalDocumentFile
|
||||||
|
|
||||||
object GameHelper {
|
object GameHelper {
|
||||||
const val KEY_GAME_PATH = "game_path"
|
const val KEY_GAME_PATH = "game_path"
|
||||||
@ -29,15 +30,7 @@ object GameHelper {
|
|||||||
// Ensure keys are loaded so that ROM metadata can be decrypted.
|
// Ensure keys are loaded so that ROM metadata can be decrypted.
|
||||||
NativeLibrary.reloadKeys()
|
NativeLibrary.reloadKeys()
|
||||||
|
|
||||||
val children = FileUtil.listFiles(context, gamesUri)
|
addGamesRecursive(games, FileUtil.listFiles(context, gamesUri), 3)
|
||||||
for (file in children) {
|
|
||||||
if (!file.isDirectory) {
|
|
||||||
// Check that the file has an extension we care about before trying to read out of it.
|
|
||||||
if (Game.extensions.contains(FileUtil.getExtension(file.uri))) {
|
|
||||||
games.add(getGame(file.uri))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cache list of games found on disk
|
// Cache list of games found on disk
|
||||||
val serializedGames = mutableSetOf<String>()
|
val serializedGames = mutableSetOf<String>()
|
||||||
@ -52,6 +45,30 @@ object GameHelper {
|
|||||||
return games.toList()
|
return games.toList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun addGamesRecursive(
|
||||||
|
games: MutableList<Game>,
|
||||||
|
files: Array<MinimalDocumentFile>,
|
||||||
|
depth: Int
|
||||||
|
) {
|
||||||
|
if (depth <= 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
files.forEach {
|
||||||
|
if (it.isDirectory) {
|
||||||
|
addGamesRecursive(
|
||||||
|
games,
|
||||||
|
FileUtil.listFiles(YuzuApplication.appContext, it.uri),
|
||||||
|
depth - 1
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
if (Game.extensions.contains(FileUtil.getExtension(it.uri))) {
|
||||||
|
games.add(getGame(it.uri))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getGame(uri: Uri): Game {
|
private fun getGame(uri: Uri): Game {
|
||||||
val filePath = uri.toString()
|
val filePath = uri.toString()
|
||||||
var name = NativeLibrary.getTitle(filePath)
|
var name = NativeLibrary.getTitle(filePath)
|
||||||
|
@ -79,8 +79,8 @@ protected:
|
|||||||
using HandlerFnP = void (Self::*)(HLERequestContext&);
|
using HandlerFnP = void (Self::*)(HLERequestContext&);
|
||||||
|
|
||||||
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
|
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
|
||||||
[[nodiscard]] std::scoped_lock<std::mutex> LockService() {
|
[[nodiscard]] virtual std::unique_lock<std::mutex> LockService() {
|
||||||
return std::scoped_lock{lock_service};
|
return std::unique_lock{lock_service};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// System context that the service operates under.
|
/// System context that the service operates under.
|
||||||
|
@ -1029,6 +1029,11 @@ BSD::~BSD() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_lock<std::mutex> BSD::LockService() {
|
||||||
|
// Do not lock socket IClient instances.
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} {
|
BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
|
@ -186,6 +186,9 @@ private:
|
|||||||
|
|
||||||
// Callback identifier for the OnProxyPacketReceived event.
|
// Callback identifier for the OnProxyPacketReceived event.
|
||||||
Network::RoomMember::CallbackHandle<Network::ProxyPacket> proxy_packet_received;
|
Network::RoomMember::CallbackHandle<Network::ProxyPacket> proxy_packet_received;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual std::unique_lock<std::mutex> LockService() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
||||||
|
@ -191,8 +191,9 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name,
|
QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name,
|
||||||
const std::vector<u8>& icon, Loader::AppLoader& loader,
|
const std::size_t size, const std::vector<u8>& icon,
|
||||||
u64 program_id, const CompatibilityList& compatibility_list,
|
Loader::AppLoader& loader, u64 program_id,
|
||||||
|
const CompatibilityList& compatibility_list,
|
||||||
const FileSys::PatchManager& patch) {
|
const FileSys::PatchManager& patch) {
|
||||||
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
||||||
|
|
||||||
@ -210,7 +211,7 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri
|
|||||||
file_type_string, program_id),
|
file_type_string, program_id),
|
||||||
new GameListItemCompat(compatibility),
|
new GameListItemCompat(compatibility),
|
||||||
new GameListItem(file_type_string),
|
new GameListItem(file_type_string),
|
||||||
new GameListItemSize(Common::FS::GetSize(path)),
|
new GameListItemSize(size),
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto patch_versions = GetGameListCachedObject(
|
const auto patch_versions = GetGameListCachedObject(
|
||||||
@ -278,8 +279,8 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) {
|
|||||||
GetMetadataFromControlNCA(patch, *control, icon, name);
|
GetMetadataFromControlNCA(patch, *control, icon, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, icon, *loader, program_id,
|
emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, file->GetSize(), icon, *loader,
|
||||||
compatibility_list, patch),
|
program_id, compatibility_list, patch),
|
||||||
parent_dir);
|
parent_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -354,8 +355,9 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
|||||||
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
|
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
|
||||||
system.GetContentProvider()};
|
system.GetContentProvider()};
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader, id,
|
emit EntryReady(MakeGameListEntry(physical_name, name,
|
||||||
compatibility_list, patch),
|
Common::FS::GetSize(physical_name), icon,
|
||||||
|
*loader, id, compatibility_list, patch),
|
||||||
parent_dir);
|
parent_dir);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -368,9 +370,10 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
|||||||
const FileSys::PatchManager patch{program_id, system.GetFileSystemController(),
|
const FileSys::PatchManager patch{program_id, system.GetFileSystemController(),
|
||||||
system.GetContentProvider()};
|
system.GetContentProvider()};
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader,
|
emit EntryReady(
|
||||||
program_id, compatibility_list, patch),
|
MakeGameListEntry(physical_name, name, Common::FS::GetSize(physical_name),
|
||||||
parent_dir);
|
icon, *loader, program_id, compatibility_list, patch),
|
||||||
|
parent_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (is_dir) {
|
} else if (is_dir) {
|
||||||
|
Reference in New Issue
Block a user