Merge pull request #3668 from RisingFog/wii_movie_sysconf

Apply Wii Settings on Movie Recording/Playback
This commit is contained in:
Pierre Bourdon 2016-03-14 01:42:37 +01:00
commit f0e25b8477
3 changed files with 21 additions and 1 deletions

View File

@ -15,6 +15,8 @@
#include "Common/SysConf.h" #include "Common/SysConf.h"
#include "Common/Logging/Log.h" #include "Common/Logging/Log.h"
#include "Core/Movie.h"
SysConf::SysConf() SysConf::SysConf()
: m_IsValid(false) : m_IsValid(false)
{ {
@ -74,6 +76,13 @@ bool SysConf::LoadFromFile(const std::string& filename)
{ {
m_Filename = filename; m_Filename = filename;
m_IsValid = true; m_IsValid = true;
// Apply Wii settings from normal SYSCONF on Movie recording/playback
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
{
SetData("IPL.LNG", Movie::GetLanguage());
SetData("IPL.E60", Movie::IsPAL60());
SetData("IPL.PGS", Movie::IsProgressive());
}
return true; return true;
} }
} }

View File

@ -80,6 +80,7 @@ static u8 s_bongos, s_memcards;
static u8 s_revision[20]; static u8 s_revision[20];
static u32 s_DSPiromHash = 0; static u32 s_DSPiromHash = 0;
static u32 s_DSPcoefHash = 0; static u32 s_DSPcoefHash = 0;
static u8 s_language = 10; //Set to unknown until language is known
static bool s_bRecordingFromSaveState = false; static bool s_bRecordingFromSaveState = false;
static bool s_bPolled = false; static bool s_bPolled = false;
@ -385,6 +386,11 @@ int GetCPUMode()
return s_iCPUCore; return s_iCPUCore;
} }
u8 GetLanguage()
{
return s_language;
}
bool IsStartingFromClearSave() bool IsStartingFromClearSave()
{ {
return g_bClearSave; return g_bClearSave;
@ -810,6 +816,7 @@ void ReadHeader()
s_bongos = tmpHeader.bongos; s_bongos = tmpHeader.bongos;
s_bSyncGPU = tmpHeader.bSyncGPU; s_bSyncGPU = tmpHeader.bSyncGPU;
s_bNetPlay = tmpHeader.bNetPlay; s_bNetPlay = tmpHeader.bNetPlay;
s_language = tmpHeader.language;
memcpy(s_revision, tmpHeader.revision, ArraySize(s_revision)); memcpy(s_revision, tmpHeader.revision, ArraySize(s_revision));
} }
else else
@ -1254,6 +1261,7 @@ void SaveRecording(const std::string& filename)
header.DSPiromHash = s_DSPiromHash; header.DSPiromHash = s_DSPiromHash;
header.DSPcoefHash = s_DSPcoefHash; header.DSPcoefHash = s_DSPcoefHash;
header.tickCount = s_totalTickCount; header.tickCount = s_totalTickCount;
header.language = s_language;
// TODO // TODO
header.uniqueID = 0; header.uniqueID = 0;
@ -1317,6 +1325,7 @@ void GetSettings()
s_bSyncGPU = SConfig::GetInstance().bSyncGPU; s_bSyncGPU = SConfig::GetInstance().bSyncGPU;
s_iCPUCore = SConfig::GetInstance().iCPUCore; s_iCPUCore = SConfig::GetInstance().iCPUCore;
s_bNetPlay = NetPlay::IsNetPlayRunning(); s_bNetPlay = NetPlay::IsNetPlayRunning();
s_language = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
if (!SConfig::GetInstance().bWii) if (!SConfig::GetInstance().bWii)
g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA); g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
s_memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0; s_memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;

View File

@ -102,7 +102,8 @@ struct DTMHeader
bool bSyncGPU; bool bSyncGPU;
bool bNetPlay; bool bNetPlay;
bool bPAL60; bool bPAL60;
u8 reserved[12]; // Padding for any new config options u8 language;
u8 reserved[11]; // Padding for any new config options
u8 discChange[40]; // Name of iso file to switch to, for two disc games. u8 discChange[40]; // Name of iso file to switch to, for two disc games.
u8 revision[20]; // Git hash u8 revision[20]; // Git hash
u32 DSPiromHash; u32 DSPiromHash;
@ -137,6 +138,7 @@ bool IsSkipIdle();
bool IsDSPHLE(); bool IsDSPHLE();
bool IsFastDiscSpeed(); bool IsFastDiscSpeed();
int GetCPUMode(); int GetCPUMode();
u8 GetLanguage();
bool IsStartingFromClearSave(); bool IsStartingFromClearSave();
bool IsUsingMemcard(int memcard); bool IsUsingMemcard(int memcard);
bool IsSyncGPU(); bool IsSyncGPU();