mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-19 19:20:46 -04:00
fix: NTFS Directory Scanning w/ Linux
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -749,16 +749,21 @@ void GameList::UpdateOnlineStatus() {
|
|||||||
|
|
||||||
// Run the blocking network call in a background thread using QtConcurrent
|
// Run the blocking network call in a background thread using QtConcurrent
|
||||||
QFuture<std::map<u64, std::pair<int, int>>> future = QtConcurrent::run([session]() {
|
QFuture<std::map<u64, std::pair<int, int>>> future = QtConcurrent::run([session]() {
|
||||||
std::map<u64, std::pair<int, int>> stats;
|
try {
|
||||||
AnnounceMultiplayerRoom::RoomList room_list = session->GetRoomList();
|
std::map<u64, std::pair<int, int>> stats;
|
||||||
for (const auto& room : room_list) {
|
AnnounceMultiplayerRoom::RoomList room_list = session->GetRoomList();
|
||||||
u64 game_id = room.information.preferred_game.id;
|
for (const auto& room : room_list) {
|
||||||
if (game_id != 0) {
|
u64 game_id = room.information.preferred_game.id;
|
||||||
stats[game_id].first += room.members.size();
|
if (game_id != 0) {
|
||||||
stats[game_id].second++;
|
stats[game_id].first += (int)room.members.size();
|
||||||
|
stats[game_id].second++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return stats;
|
||||||
|
} catch (const std::exception& e) {
|
||||||
|
LOG_ERROR(Frontend, "Exception in Online Status thread: {}", e.what());
|
||||||
|
return std::map<u64, std::pair<int, int>>{};
|
||||||
}
|
}
|
||||||
return stats;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
online_status_watcher->setFuture(future);
|
online_status_watcher->setFuture(future);
|
||||||
@@ -1312,15 +1317,16 @@ void GameList::LoadInterfaceLayout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QStringList GameList::supported_file_extensions = {
|
const QStringList GameList::supported_file_extensions = {
|
||||||
QStringLiteral("nso"), QStringLiteral("nro"), QStringLiteral("nca"),
|
QStringLiteral("xci"), QStringLiteral("nsp"),
|
||||||
QStringLiteral("xci"), QStringLiteral("nsp"), QStringLiteral("kip")};
|
QStringLiteral("nso"), QStringLiteral("nro"), QStringLiteral("kip")
|
||||||
|
};
|
||||||
|
|
||||||
void GameList::RefreshGameDirectory() {
|
void GameList::RefreshGameDirectory() {
|
||||||
if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) {
|
if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) {
|
||||||
LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list.");
|
LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list.");
|
||||||
PopulateAsync(UISettings::values.game_dirs);
|
PopulateAsync(UISettings::values.game_dirs);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GameList::ToggleFavorite(u64 program_id) {
|
void GameList::ToggleFavorite(u64 program_id) {
|
||||||
if (!UISettings::values.favorited_ids.contains(program_id)) {
|
if (!UISettings::values.favorited_ids.contains(program_id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user