mirror of https://github.com/PCSX2/pcsx2.git
unix: Remove LZMA_SUPPORTED define
This commit is contained in:
parent
3912f3330f
commit
a6ed698fca
|
@ -14,7 +14,6 @@ set(CommonFlags
|
||||||
-Wno-unknown-pragmas
|
-Wno-unknown-pragmas
|
||||||
-Wno-parentheses
|
-Wno-parentheses
|
||||||
-Wunused-variable # __dummy variable need to be investigated
|
-Wunused-variable # __dummy variable need to be investigated
|
||||||
-DLZMA_SUPPORTED # must be always supported on linux
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(USE_ICC)
|
if(USE_ICC)
|
||||||
|
|
|
@ -1585,13 +1585,9 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
|
||||||
else
|
else
|
||||||
f.replace(f.end()-3, f.end(), "_repack.gs");
|
f.replace(f.end()-3, f.end(), "_repack.gs");
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
GSDumpFile* file = is_xz
|
GSDumpFile* file = is_xz
|
||||||
? (GSDumpFile*) new GSDumpLzma(lpszCmdLine, repack_dump ? f.c_str() : nullptr)
|
? (GSDumpFile*) new GSDumpLzma(lpszCmdLine, repack_dump ? f.c_str() : nullptr)
|
||||||
: (GSDumpFile*) new GSDumpRaw(lpszCmdLine, repack_dump ? f.c_str() : nullptr);
|
: (GSDumpFile*) new GSDumpRaw(lpszCmdLine, repack_dump ? f.c_str() : nullptr);
|
||||||
#else
|
|
||||||
GSDumpFile* file = new GSDumpRaw(lpszCmdLine, repack_dump ? f.c_str() : nullptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32 crc;
|
uint32 crc;
|
||||||
file->Read(&crc, 4);
|
file->Read(&crc, 4);
|
||||||
|
|
|
@ -117,8 +117,6 @@ void GSDump::AppendRawData(uint8 c)
|
||||||
// GSDumpXz implementation
|
// GSDumpXz implementation
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
|
|
||||||
GSDumpXz::GSDumpXz(const std::string& fn, uint32 crc, const GSFreezeData& fd, const GSPrivRegSet* regs)
|
GSDumpXz::GSDumpXz(const std::string& fn, uint32 crc, const GSFreezeData& fd, const GSPrivRegSet* regs)
|
||||||
: GSDumpBase(fn + ".gs.xz")
|
: GSDumpBase(fn + ".gs.xz")
|
||||||
{
|
{
|
||||||
|
@ -194,5 +192,3 @@ void GSDumpXz::Compress(lzma_action action, lzma_ret expected_status)
|
||||||
|
|
||||||
} while (m_strm.avail_out == 0);
|
} while (m_strm.avail_out == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "GSVertexSW.h"
|
#include "GSVertexSW.h"
|
||||||
|
#include <lzma.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -75,10 +76,6 @@ public:
|
||||||
virtual ~GSDump() = default;
|
virtual ~GSDump() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
|
|
||||||
#include <lzma.h>
|
|
||||||
|
|
||||||
class GSDumpXz final : public GSDumpBase
|
class GSDumpXz final : public GSDumpBase
|
||||||
{
|
{
|
||||||
lzma_stream m_strm;
|
lzma_stream m_strm;
|
||||||
|
@ -94,5 +91,3 @@ public:
|
||||||
GSDumpXz(const std::string& fn, uint32 crc, const GSFreezeData& fd, const GSPrivRegSet* regs);
|
GSDumpXz(const std::string& fn, uint32 crc, const GSFreezeData& fd, const GSPrivRegSet* regs);
|
||||||
virtual ~GSDumpXz();
|
virtual ~GSDumpXz();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSLzma.h"
|
#include "GSLzma.h"
|
||||||
|
|
||||||
#if defined(__unix__)
|
|
||||||
|
|
||||||
GSDumpFile::GSDumpFile(char* filename, const char* repack_filename) {
|
GSDumpFile::GSDumpFile(char* filename, const char* repack_filename) {
|
||||||
m_fp = fopen(filename, "rb");
|
m_fp = fopen(filename, "rb");
|
||||||
if (m_fp == nullptr) {
|
if (m_fp == nullptr) {
|
||||||
|
@ -56,8 +54,6 @@ GSDumpFile::~GSDumpFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
|
|
||||||
GSDumpLzma::GSDumpLzma(char* filename, const char* repack_filename) : GSDumpFile(filename, repack_filename) {
|
GSDumpLzma::GSDumpLzma(char* filename, const char* repack_filename) : GSDumpFile(filename, repack_filename) {
|
||||||
|
|
||||||
memset(&m_strm, 0, sizeof(lzma_stream));
|
memset(&m_strm, 0, sizeof(lzma_stream));
|
||||||
|
@ -146,8 +142,6 @@ GSDumpLzma::~GSDumpLzma() {
|
||||||
_aligned_free(m_area);
|
_aligned_free(m_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
|
|
||||||
GSDumpRaw::GSDumpRaw(char* filename, const char* repack_filename) : GSDumpFile(filename, repack_filename) {
|
GSDumpRaw::GSDumpRaw(char* filename, const char* repack_filename) : GSDumpFile(filename, repack_filename) {
|
||||||
|
@ -176,5 +170,3 @@ void GSDumpRaw::Read(void* ptr, size_t size) {
|
||||||
}
|
}
|
||||||
Repack(ptr, size);
|
Repack(ptr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -18,11 +18,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__unix__)
|
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
#include <lzma.h>
|
#include <lzma.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
class GSDumpFile {
|
class GSDumpFile {
|
||||||
FILE* m_repack_fp;
|
FILE* m_repack_fp;
|
||||||
|
@ -40,7 +36,6 @@ class GSDumpFile {
|
||||||
virtual ~GSDumpFile();
|
virtual ~GSDumpFile();
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
class GSDumpLzma : public GSDumpFile {
|
class GSDumpLzma : public GSDumpFile {
|
||||||
|
|
||||||
lzma_stream m_strm;
|
lzma_stream m_strm;
|
||||||
|
@ -62,7 +57,6 @@ class GSDumpLzma : public GSDumpFile {
|
||||||
bool IsEof();
|
bool IsEof();
|
||||||
void Read(void* ptr, size_t size);
|
void Read(void* ptr, size_t size);
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
class GSDumpRaw : public GSDumpFile {
|
class GSDumpRaw : public GSDumpFile {
|
||||||
|
|
||||||
|
@ -83,5 +77,3 @@ class GSDumpRaw : public GSDumpFile {
|
||||||
bool IsEof();
|
bool IsEof();
|
||||||
void Read(void* ptr, size_t size);
|
void Read(void* ptr, size_t size);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -470,14 +470,10 @@ void GSRenderer::VSync(int field)
|
||||||
fd.data = new uint8[fd.size];
|
fd.data = new uint8[fd.size];
|
||||||
Freeze(&fd, false);
|
Freeze(&fd, false);
|
||||||
|
|
||||||
#ifdef LZMA_SUPPORTED
|
|
||||||
if (m_control_key)
|
if (m_control_key)
|
||||||
m_dump = std::unique_ptr<GSDumpBase>(new GSDump(m_snapshot, m_crc, fd, m_regs));
|
m_dump = std::unique_ptr<GSDumpBase>(new GSDump(m_snapshot, m_crc, fd, m_regs));
|
||||||
else
|
else
|
||||||
m_dump = std::unique_ptr<GSDumpBase>(new GSDumpXz(m_snapshot, m_crc, fd, m_regs));
|
m_dump = std::unique_ptr<GSDumpBase>(new GSDumpXz(m_snapshot, m_crc, fd, m_regs));
|
||||||
#else
|
|
||||||
m_dump = std::unique_ptr<GSDumpBase>(new GSDump(m_snapshot, m_crc, fd, m_regs));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
delete [] fd.data;
|
delete [] fd.data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue