Apply Wii Settings on Movie Recording/Playback

This commit is contained in:
Chris Burgener 2016-02-24 13:56:59 -05:00
parent 73739696ef
commit 4aa6f6c812
3 changed files with 19 additions and 1 deletions

View File

@ -45,6 +45,13 @@ CWII_IPC_HLE_Device_usb_oh1_57e_305::CWII_IPC_HLE_Device_usb_oh1_57e_305(u32 _De
owned_sysconf.reset(new SysConf());
sysconf = owned_sysconf.get();
sysconf->LoadFromFile(File::GetUserPath(D_SESSION_WIIROOT_IDX) + DIR_SEP WII_SYSCONF_DIR DIR_SEP WII_SYSCONF);
// Apply Wii settings from normal SYSCONF on Movie recording/playback
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
{
sysconf->SetData("IPL.LNG", Movie::GetLanguage());
sysconf->SetData("IPL.E60", Movie::IsPAL60());
sysconf->SetData("IPL.PGS", Movie::IsProgressive());
}
}
else
{

View File

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

View File

@ -102,7 +102,8 @@ struct DTMHeader
bool bSyncGPU;
bool bNetPlay;
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 revision[20]; // Git hash
u32 DSPiromHash;
@ -137,6 +138,7 @@ bool IsSkipIdle();
bool IsDSPHLE();
bool IsFastDiscSpeed();
int GetCPUMode();
u8 GetLanguage();
bool IsStartingFromClearSave();
bool IsUsingMemcard(int memcard);
bool IsSyncGPU();