mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
rsx: zip and unzip rsx captures
This commit is contained in:
parent
66d01b688c
commit
840455b872
3 changed files with 25 additions and 4 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "Utilities/StrUtil.h"
|
||||
|
||||
#include "../Crypto/unself.h"
|
||||
#include "../Crypto/unzip.h"
|
||||
#include "util/logs.hpp"
|
||||
#include "util/serialization.hpp"
|
||||
#include "savestate_utils.hpp"
|
||||
|
@ -717,6 +718,16 @@ bool Emulator::BootRsxCapture(const std::string& path)
|
|||
load.m_file_handler = make_uncompressed_serialization_file_handler(std::move(in_file));
|
||||
load.set_reading_state();
|
||||
|
||||
if (fmt::to_lower(path).ends_with(".gz"))
|
||||
{
|
||||
load.data = unzip(load.data);
|
||||
if (load.data.empty())
|
||||
{
|
||||
sys_log.error("Failed to unzip rsx capture file!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
load(*frame);
|
||||
in_file.close();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue