mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
made savestates synchronous and immediate. this allows saving or loading while the emulator is paused, fixes issues where savestate hotkeys would get ignored if pressed too close together, might speed up savestates in some cases, and hopefully makes savestates more stable too.
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#define _MIXER_H_
|
||||
|
||||
#include "WaveFile.h"
|
||||
#include "StdMutex.h"
|
||||
|
||||
// 16 bit Stereo
|
||||
#define MAX_SAMPLES (1024 * 8)
|
||||
@ -89,6 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::mutex& MixerCritical() { return m_csMixing; }
|
||||
|
||||
protected:
|
||||
unsigned int m_sampleRate;
|
||||
@ -110,7 +112,7 @@ protected:
|
||||
u32 m_indexR;
|
||||
|
||||
bool m_AIplaying;
|
||||
|
||||
std::mutex m_csMixing;
|
||||
private:
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user