Add an IsMovieActive function.

Makes things a bit simpler, since this is a common check.
This commit is contained in:
Rachel Bryk
2014-09-06 23:44:25 -04:00
parent 46c18aa909
commit 5a163ec5e6
10 changed files with 25 additions and 20 deletions

View File

@ -113,7 +113,7 @@ static bool IsMovieHeader(u8 magic[4])
std::string GetInputDisplay()
{
if (!IsPlayingInput() && !IsRecordingInput())
if (!IsMovieActive())
{
g_numPads = 0;
for (int i = 0; i < 4; i++)
@ -198,7 +198,7 @@ void Init()
for (auto& disp : g_InputDisplay)
disp.clear();
if (!IsPlayingInput() && !IsRecordingInput())
if (!IsMovieActive())
{
g_bRecordingFromSaveState = false;
g_rerecords = 0;
@ -273,7 +273,7 @@ void SetReadOnly(bool bEnabled)
void FrameSkipping()
{
// Frameskipping will desync movie playback
if (!IsPlayingInput() && !IsRecordingInput())
if (!IsMovieActive())
{
std::lock_guard<std::mutex> lk(cs_frameSkip);
@ -310,6 +310,11 @@ bool IsPlayingInput()
return (g_playMode == MODE_PLAYING);
}
bool IsMovieActive()
{
return g_playMode != MODE_NONE;
}
bool IsReadOnly()
{
return g_bReadOnly;