mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Preliminary video save state support. More work is necessary, this is just some infrastructure for inter-project communication.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@332 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -410,6 +410,14 @@ EState GetState()
|
||||
return CORE_UNINITIALIZED;
|
||||
}
|
||||
|
||||
void SaveState() {
|
||||
PluginVideo::Video_SaveState();
|
||||
}
|
||||
|
||||
void LoadState() {
|
||||
PluginVideo::Video_LoadState();
|
||||
}
|
||||
|
||||
const SCoreStartupParameter& GetStartupParameter()
|
||||
{
|
||||
return g_CoreStartupParameter;
|
||||
|
@ -42,6 +42,10 @@ namespace Core
|
||||
// Get state
|
||||
EState GetState();
|
||||
|
||||
// Save/Load state
|
||||
void SaveState();
|
||||
void LoadState();
|
||||
|
||||
// get core parameters
|
||||
extern SCoreStartupParameter g_CoreStartupParameter; //uck
|
||||
const SCoreStartupParameter& GetStartupParameter();
|
||||
|
@ -35,6 +35,8 @@ typedef void (__cdecl* TVideo_EnterLoop)();
|
||||
|
||||
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
|
||||
|
||||
typedef void (__cdecl* TVideo_SaveState)();
|
||||
typedef void (__cdecl* TVideo_LoadState)();
|
||||
|
||||
//! Function Pointer
|
||||
TGetDllInfo g_GetDllInfo = 0;
|
||||
@ -48,6 +50,8 @@ TVideo_UpdateXFB g_Video_UpdateXFB = 0;
|
||||
TVideo_Screenshot g_Video_Screenshot = 0;
|
||||
TVideo_EnterLoop g_Video_EnterLoop = 0;
|
||||
TVideo_AddMessage g_Video_AddMessage = 0;
|
||||
TVideo_SaveState g_Video_SaveState = 0;
|
||||
TVideo_LoadState g_Video_LoadState = 0;
|
||||
|
||||
//! Library Instance
|
||||
DynamicLibrary plugin;
|
||||
@ -69,6 +73,8 @@ void UnloadPlugin()
|
||||
g_Video_SendFifoData = 0;
|
||||
g_Video_UpdateXFB = 0;
|
||||
g_Video_AddMessage = 0;
|
||||
g_Video_SaveState = 0;
|
||||
g_Video_LoadState = 0;
|
||||
|
||||
plugin.Unload();
|
||||
}
|
||||
@ -88,6 +94,8 @@ bool LoadPlugin(const char *_Filename)
|
||||
g_Video_Screenshot = reinterpret_cast<TVideo_Screenshot> (plugin.Get("Video_Screenshot"));
|
||||
g_Video_EnterLoop = reinterpret_cast<TVideo_EnterLoop> (plugin.Get("Video_EnterLoop"));
|
||||
g_Video_AddMessage = reinterpret_cast<TVideo_AddMessage> (plugin.Get("Video_AddMessage"));
|
||||
g_Video_SaveState = reinterpret_cast<TVideo_SaveState> (plugin.Get("Video_SaveState"));
|
||||
g_Video_LoadState = reinterpret_cast<TVideo_LoadState> (plugin.Get("Video_LoadState"));
|
||||
|
||||
if ((g_GetDllInfo != 0) &&
|
||||
(g_DllAbout != 0) &&
|
||||
@ -99,7 +107,9 @@ bool LoadPlugin(const char *_Filename)
|
||||
(g_Video_UpdateXFB != 0) &&
|
||||
(g_Video_EnterLoop != 0) &&
|
||||
(g_Video_Screenshot != 0) &&
|
||||
(g_Video_AddMessage != 0))
|
||||
(g_Video_AddMessage != 0) &&
|
||||
(g_Video_SaveState != 0) &&
|
||||
(g_Video_LoadState != 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -171,4 +181,12 @@ void Video_AddMessage(const char* pstr, unsigned int milliseconds)
|
||||
g_Video_AddMessage(pstr,milliseconds);
|
||||
}
|
||||
|
||||
void Video_SaveState() {
|
||||
g_Video_SaveState();
|
||||
}
|
||||
|
||||
void Video_LoadState() {
|
||||
g_Video_SaveState();
|
||||
}
|
||||
|
||||
} // end of namespace PluginVideo
|
||||
|
@ -42,6 +42,9 @@ void Video_UpdateXFB(BYTE* _pXFB, DWORD _dwHeight, DWORD _dwWidth);
|
||||
bool Video_Screenshot(TCHAR* _szFilename);
|
||||
void Video_AddMessage(const char* pstr, unsigned int milliseconds);
|
||||
|
||||
void Video_SaveState();
|
||||
void Video_LoadState();
|
||||
|
||||
} // end of namespace PluginVideo
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user