mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Remove unnecessary Src/ folders
This commit is contained in:
66
Source/Core/Core/State.h
Normal file
66
Source/Core/Core/State.h
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// Emulator state saving support.
|
||||
|
||||
#ifndef _STATE_H_
|
||||
#define _STATE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace State
|
||||
{
|
||||
|
||||
// number of states
|
||||
static const u32 NUM_STATES = 10;
|
||||
|
||||
struct StateHeader
|
||||
{
|
||||
u8 gameID[6];
|
||||
u32 size;
|
||||
double time;
|
||||
};
|
||||
|
||||
void Init();
|
||||
|
||||
void Shutdown();
|
||||
|
||||
void EnableCompression(bool compression);
|
||||
|
||||
bool ReadHeader(const std::string filename, StateHeader& header);
|
||||
|
||||
// These don't happen instantly - they get scheduled as events.
|
||||
// ...But only if we're not in the main cpu thread.
|
||||
// If we're in the main cpu thread then they run immediately instead
|
||||
// because some things (like Lua) need them to run immediately.
|
||||
// Slots from 0-99.
|
||||
void Save(int slot, bool wait = false);
|
||||
void Load(int slot);
|
||||
void Verify(int slot);
|
||||
|
||||
void SaveAs(const std::string &filename, bool wait = false);
|
||||
void LoadAs(const std::string &filename);
|
||||
void VerifyAt(const std::string &filename);
|
||||
|
||||
void SaveToBuffer(std::vector<u8>& buffer);
|
||||
void LoadFromBuffer(std::vector<u8>& buffer);
|
||||
void VerifyBuffer(std::vector<u8>& buffer);
|
||||
|
||||
void LoadLastSaved(int i = 1);
|
||||
void SaveFirstSaved();
|
||||
void UndoSaveState();
|
||||
void UndoLoadState();
|
||||
|
||||
// wait until previously scheduled savestate event (if any) is done
|
||||
void Flush();
|
||||
|
||||
// for calling back into UI code without introducing a dependency on it in core
|
||||
typedef void(*CallbackFunc)(void);
|
||||
void SetOnAfterLoadCallback(CallbackFunc callback);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user