mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 15:30:29 +02:00
Add an option to allow resetting video/audio dump on save/load state.
This commit is contained in:
1 parent
99ab8dfc99
commit
e698414f9b
6 files changed
+55
-2
No files matched your search
@@ -46,6 +46,14 @@
|
||||
#include "HW/MemoryStick.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
#ifndef MOBILE_DEVICE
|
||||
#include "Core/AVIDump.h"
|
||||
#include "Core/HLE/__sceAudio.h"
|
||||
|
||||
AVIDump video;
|
||||
WAVDump audio;
|
||||
#endif
|
||||
|
||||
namespace SaveState
|
||||
{
|
||||
struct SaveStart
|
||||
@@ -591,6 +599,17 @@ namespace SaveState
|
||||
callbackMessage = sc->T("Loaded State");
|
||||
callbackResult = true;
|
||||
hasLoadedState = true;
|
||||
#ifndef MOBILE_DEVICE
|
||||
if (g_Config.bSaveLoadResetsAVdumping) {
|
||||
if (g_Config.bDumpFrames) {
|
||||
video.Stop();
|
||||
video.Start(PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight);
|
||||
}
|
||||
if (g_Config.bDumpAudio) {
|
||||
audio.Reset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else if (result == CChunkFileReader::ERROR_BROKEN_STATE) {
|
||||
HandleFailure();
|
||||
callbackMessage = i18nLoadFailure;
|
||||
@@ -615,6 +634,17 @@ namespace SaveState
|
||||
if (result == CChunkFileReader::ERROR_NONE) {
|
||||
callbackMessage = sc->T("Saved State");
|
||||
callbackResult = true;
|
||||
#ifndef MOBILE_DEVICE
|
||||
if (g_Config.bSaveLoadResetsAVdumping) {
|
||||
if (g_Config.bDumpFrames) {
|
||||
video.Stop();
|
||||
video.Start(PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight);
|
||||
}
|
||||
if (g_Config.bDumpAudio) {
|
||||
audio.Reset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else if (result == CChunkFileReader::ERROR_BROKEN_STATE) {
|
||||
HandleFailure();
|
||||
callbackMessage = i18nSaveFailure;
|
||||
|
||||
Reference in new issue
Block a user