mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Abort loading states from incompatible graphics backends.
This commit is contained in:
parent
db838e759b
commit
08fe3c213a
@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
|
||||
static std::thread g_save_thread;
|
||||
|
||||
// Don't forget to increase this after doing changes on the savestate system
|
||||
static const u32 STATE_VERSION = 14;
|
||||
static const u32 STATE_VERSION = 15;
|
||||
|
||||
struct StateHeader
|
||||
{
|
||||
|
@ -186,6 +186,11 @@ void VideoBackendHardware::InitializeShared()
|
||||
// Run from the CPU thread
|
||||
void VideoBackendHardware::DoState(PointerWrap& p)
|
||||
{
|
||||
bool software = false;
|
||||
p.Do(software);
|
||||
if (p.GetMode() == PointerWrap::MODE_READ && software == true)
|
||||
// change mode to abort load of incompatible save state.
|
||||
p.SetMode(PointerWrap::MODE_VERIFY);
|
||||
VideoCommon_DoState(p);
|
||||
p.DoMarker("VideoCommon");
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "Core.h"
|
||||
#include "OpcodeDecoder.h"
|
||||
#include "SWVertexLoader.h"
|
||||
#include "SWStatistics.h"
|
||||
|
||||
#define VSYNC_ENABLED 0
|
||||
|
||||
@ -97,6 +98,11 @@ bool VideoSoftware::Initialize(void *&window_handle)
|
||||
|
||||
void VideoSoftware::DoState(PointerWrap& p)
|
||||
{
|
||||
bool software = true;
|
||||
p.Do(software);
|
||||
if (p.GetMode() == PointerWrap::MODE_READ && software == false)
|
||||
// change mode to abort load of incompatible save state.
|
||||
p.SetMode(PointerWrap::MODE_VERIFY);
|
||||
// TODO: incomplete
|
||||
SWCommandProcessor::DoState(p);
|
||||
SWPixelEngine::DoState(p);
|
||||
@ -105,6 +111,7 @@ void VideoSoftware::DoState(PointerWrap& p)
|
||||
Clipper::DoState(p);
|
||||
p.Do(swxfregs);
|
||||
p.Do(bpmem);
|
||||
p.Do(swstats);
|
||||
|
||||
// CP Memory
|
||||
p.DoArray(arraybases, 16);
|
||||
|
Loading…
Reference in New Issue
Block a user