GameList: Don't save custom titles to cache

Stops custom titles from being unremovable.
pull/3563/head v0.1-9669
Stenzek 2 months ago
parent dc7eec7eac
commit d0840c0615
No known key found for this signature in database

@ -52,7 +52,7 @@ namespace {
enum : u32
{
GAME_LIST_CACHE_SIGNATURE = 0x45434C48,
GAME_LIST_CACHE_VERSION = 38,
GAME_LIST_CACHE_VERSION = 39,
PLAYED_TIME_SERIAL_LENGTH = 32,
PLAYED_TIME_LAST_TIME_LENGTH = 20, // uint64
@ -478,7 +478,7 @@ bool GameList::WriteEntryToCache(const Entry* entry, const std::string& entry_pa
writer.WriteU8(static_cast<u8>(entry->region));
writer.WriteSizePrefixedString(entry_path);
writer.WriteSizePrefixedString(entry->serial);
writer.WriteSizePrefixedString(entry->title);
writer.WriteSizePrefixedString(entry->has_custom_title ? std::string_view() : std::string_view(entry->title));
writer.WriteU64(entry->hash);
writer.WriteS64(entry->file_size);
writer.WriteU64(entry->uncompressed_size);

@ -266,14 +266,12 @@ void GameSummaryWidget::populateCustomAttributes()
return;
}
if (entry->has_custom_title)
{
QSignalBlocker sb(m_ui.title);
m_ui.title->setText(QtUtils::StringViewToQString(entry->GetDisplayTitle(GameList::ShouldShowLocalizedTitles())));
}
m_ui.restoreTitle->setEnabled(entry->has_custom_title);
if (entry->has_custom_region)
{
QSignalBlocker sb(m_ui.region);
m_ui.region->setCurrentIndex(static_cast<int>(entry->region));

Loading…
Cancel
Save