diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index ef8a6183d8..5ce0522038 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -723,19 +723,22 @@ namespace rsx avconf::avconf(utils::serial& ar) { - ar(*this); + save(ar); } void avconf::save(utils::serial& ar) { [[maybe_unused]] const s32 version = GET_OR_USE_SERIALIZATION_VERSION(ar.is_writing(), rsx); - ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state); - - if (ar.is_writing() || version >= 3) + if (!ar.is_writing() && version < 3) { - ar(scan_mode); + // Be compatible with previous bitwise serialization + ar(std::span(reinterpret_cast(this), ::offset32(&avconf::scan_mode))); + ar.pos += utils::align(::offset32(&avconf::scan_mode), alignof(avconf)) - ::offset32(&avconf::scan_mode); + return; } + + ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state, scan_mode); } void thread::capture_frame(const std::string &name) diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index 4415f4d5ba..cfd37ee2bf 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -215,7 +215,7 @@ std::string get_savestate_file(std::string_view title_id, std::string_view boot_ if (abs_id == -1 && rel_id == -1) { // Return directory - return fs::get_cache_dir() + "/savestates/" + title + "/"; + return fs::get_cache_dir() + "savestates/" + title + "/"; } ensure(rel_id < 0 || abs_id >= 0, "Unimplemented!"); @@ -263,7 +263,7 @@ bool boot_last_savestate(bool testing) { if (!g_cfg.savestate.suspend_emu && !Emu.GetTitleID().empty() && (Emu.IsRunning() || Emu.GetStatus() == system_state::paused)) { - const std::string save_dir = fs::get_cache_dir() + "/savestates/" + Emu.GetTitleID() + '/'; + const std::string save_dir = fs::get_cache_dir() + "savestates/" + Emu.GetTitleID() + '/'; std::string savestate_path; s64 mtime = smin; diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 55e8e0bcf0..632c683bb5 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -618,7 +618,7 @@ void main_window::BootSavestate() stopped = true; } - const QString file_path = QFileDialog::getOpenFileName(this, tr("Select Savestate To Boot"), qstr(fs::get_cache_dir() + "/savestates/"), tr( + const QString file_path = QFileDialog::getOpenFileName(this, tr("Select Savestate To Boot"), qstr(fs::get_cache_dir() + "savestates/"), tr( "Savestate files (*.SAVESTAT *.SAVESTAT.gz);;" "All files (*.*)"), Q_NULLPTR, QFileDialog::DontResolveSymlinks);