Merge branch 'master' into add_content_integrity_check

This commit is contained in:
Antonino Di Guardo 2026-05-08 19:36:35 +02:00 committed by GitHub
commit 40dbeaf2a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 35 additions and 14 deletions

View File

@ -618,6 +618,10 @@ QComboBox QAbstractItemView::item {
border-radius: 4px;
}
QComboBox QAbstractItemView::item:hover {
background-color: #343434;
}
QComboBox QAbstractItemView::item:selected {
background-color: #383838;
}

View File

@ -618,6 +618,10 @@ QComboBox QAbstractItemView::item {
border-radius: 4px;
}
QComboBox QAbstractItemView::item:hover {
background-color: #F3F3F3;
}
QComboBox QAbstractItemView::item:selected {
background-color: #F0F0F0;
}

View File

@ -51,6 +51,7 @@ std::unordered_map<std::string, ppu_static_module*>& ppu_module_manager::get()
std::vector<std::string> g_ppu_function_names;
atomic_t<u32> liblv2_begin = 0, liblv2_end = 0;
atomic_t<bool> libusbd_active = false;
extern u32 ppu_generate_id(std::string_view name)
{
@ -1928,6 +1929,10 @@ shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_load, c
liblv2_begin = prx->segs[0].addr;
liblv2_end = prx->segs[0].addr + prx->segs[0].size;
}
if (prx->path.ends_with("sys/external/libusbd.sprx"sv))
{
libusbd_active = true;
}
std::vector<u32> applied;
@ -2062,6 +2067,10 @@ void ppu_unload_prx(const lv2_prx& prx)
liblv2_begin = 0;
liblv2_end = 0;
}
if (prx.path.ends_with("sys/external/libusbd.sprx"sv))
{
libusbd_active = false;
}
// Format patch name
std::string hash = fmt::format("PRX-%s", fmt::base57(prx.sha1));

View File

@ -56,6 +56,8 @@ cfg_guncon3 g_cfg_guncon3;
cfg_topshotelite g_cfg_topshotelite;
cfg_topshotfearmaster g_cfg_topshotfearmaster;
extern atomic_t<bool> libusbd_active;
template <>
void fmt_class_string<libusb_transfer>::format(std::string& out, u64 arg)
{
@ -661,7 +663,7 @@ void usb_handler_thread::operator()()
u64 delay = 1'000;
// Process fake transfers
if (!fake_transfers.empty())
if (libusbd_active && !fake_transfers.empty())
{
std::lock_guard lock_tf(mutex_transfers);
u64 timestamp = get_system_time() - Emu.GetPauseTime();

View File

@ -49,7 +49,7 @@ void game_list_base::IconLoadFunction(game_info game, qreal device_pixel_ratio,
static std::unordered_set<std::string> warn_once_list;
static shared_mutex s_mtx;
if (game->icon.isNull() && !gui::utils::load_icon(game->icon, game->info.icon_path, game->icon_in_archive ? game->info.path : ""))
if (game->icon.isNull() && !gui::utils::load_icon(game->icon, game->info.icon_path, game->icon_in_archive ? game->info.path : "", game->info.game_dir))
{
if (game_list_log.warning)
{

View File

@ -2348,7 +2348,7 @@
<item>
<widget class="QLabel" name="label_squircle_left">
<property name="text">
<string>Left</string>
<string comment="Analog stick">Left</string>
</property>
</widget>
</item>
@ -2378,7 +2378,7 @@
<item>
<widget class="QLabel" name="label_squircle_right">
<property name="text">
<string>Right</string>
<string comment="Analog stick">Right</string>
</property>
</widget>
</item>
@ -2429,7 +2429,7 @@
<item>
<widget class="QLabel" name="label_stick_multi_left">
<property name="text">
<string>Left</string>
<string comment="Analog stick">Left</string>
</property>
</widget>
</item>
@ -2456,7 +2456,7 @@
<item>
<widget class="QLabel" name="label_stick_multi_right">
<property name="text">
<string>Right</string>
<string comment="Analog stick">Right</string>
</property>
</widget>
</item>
@ -2673,7 +2673,7 @@
<item>
<widget class="QLabel" name="left_stick_lerp_label">
<property name="text">
<string>Left</string>
<string comment="Analog stick">Left</string>
</property>
</widget>
</item>
@ -2703,7 +2703,7 @@
<item>
<widget class="QLabel" name="right_stick_lerp_label">
<property name="text">
<string>Right</string>
<string comment="Analog stick">Right</string>
</property>
</widget>
</item>

View File

@ -705,7 +705,7 @@ namespace gui
return QString("%1 days ago %2").arg(current_date - exctrated_date).arg(date.toString(fmt_relative));
}
bool load_iso_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path)
bool load_iso_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path, const std::string& game_dir)
{
if (icon_path.empty() || archive_path.empty()) return false;
@ -716,7 +716,9 @@ namespace gui
// With the exception of raw device, check cache first — avoids constructing a full iso_archive just for the icon.
iso_metadata_cache_entry cache_entry{};
if (!is_raw_device && iso_cache::load(archive_path, archive_path, cache_entry) && !cache_entry.icon_data.empty())
const std::string cache_key = game_dir.empty() ? archive_path : archive_path + "//" + game_dir;
if (!is_raw_device && iso_cache::load(archive_path, cache_key, cache_entry) && !cache_entry.icon_data.empty())
{
const QByteArray data(reinterpret_cast<const char*>(cache_entry.icon_data.data()),
static_cast<qsizetype>(cache_entry.icon_data.size()));
@ -736,7 +738,7 @@ namespace gui
return icon.loadFromData(data);
}
bool load_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path)
bool load_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path, const std::string& game_dir)
{
if (icon_path.empty()) return false;
@ -745,7 +747,7 @@ namespace gui
return icon.load(QString::fromStdString(icon_path));
}
return load_iso_icon(icon, icon_path, archive_path);
return load_iso_icon(icon, icon_path, archive_path, game_dir);
}
QString format_timestamp(s64 time, const QString& fmt)

View File

@ -193,10 +193,10 @@ namespace gui
}
// Loads an icon from an (ISO) archive file.
bool load_iso_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path);
bool load_iso_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path, const std::string& game_dir = {});
// Loads an icon (optionally from an (ISO) archive file).
bool load_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path);
bool load_icon(QPixmap& icon, const std::string& icon_path, const std::string& archive_path, const std::string& game_dir = {});
template <typename T>
void stop_future_watcher(QFutureWatcher<T>& watcher, bool cancel, std::shared_ptr<atomic_t<bool>> cancel_flag = nullptr)