From bf85fbe331c9a6998d0de1917626cbfebeb1d1e2 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 1 Sep 2020 20:29:15 +1000 Subject: [PATCH] GameSettings: Fix widescreen hack not saving to cache --- src/frontend-common/game_list.h | 2 +- src/frontend-common/game_settings.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend-common/game_list.h b/src/frontend-common/game_list.h index 22503f306..aac50561d 100644 --- a/src/frontend-common/game_list.h +++ b/src/frontend-common/game_list.h @@ -112,7 +112,7 @@ private: enum : u32 { GAME_LIST_CACHE_SIGNATURE = 0x45434C47, - GAME_LIST_CACHE_VERSION = 6 + GAME_LIST_CACHE_VERSION = 7 }; using DatabaseMap = std::unordered_map; diff --git a/src/frontend-common/game_settings.cpp b/src/frontend-common/game_settings.cpp index f390398d2..7b2bc84af 100644 --- a/src/frontend-common/game_settings.cpp +++ b/src/frontend-common/game_settings.cpp @@ -91,7 +91,8 @@ bool Entry::LoadFromStream(ByteStream* stream) if (!stream->Read2(bits.data(), num_bytes) || !ReadOptionalFromStream(stream, &display_active_start_offset) || !ReadOptionalFromStream(stream, &display_active_end_offset) || !ReadOptionalFromStream(stream, &display_crop_mode) || !ReadOptionalFromStream(stream, &display_aspect_ratio) || - !ReadOptionalFromStream(stream, &controller_1_type) || !ReadOptionalFromStream(stream, &controller_2_type)) + !ReadOptionalFromStream(stream, &controller_1_type) || !ReadOptionalFromStream(stream, &controller_2_type) || + !ReadOptionalFromStream(stream, &gpu_widescreen_hack)) { return false; } @@ -120,7 +121,7 @@ bool Entry::SaveToStream(ByteStream* stream) const return stream->Write2(bits.data(), num_bytes) && WriteOptionalToStream(stream, display_active_start_offset) && WriteOptionalToStream(stream, display_active_end_offset) && WriteOptionalToStream(stream, display_crop_mode) && WriteOptionalToStream(stream, display_aspect_ratio) && WriteOptionalToStream(stream, controller_1_type) && - WriteOptionalToStream(stream, controller_2_type); + WriteOptionalToStream(stream, controller_2_type) && WriteOptionalToStream(stream, gpu_widescreen_hack); } static void ParseIniSection(Entry* entry, const char* section, const CSimpleIniA& ini)