Merge https://github.com/project64/project64 into wine-fix-settings
This commit is contained in:
commit
f669447039
|
@ -65,6 +65,10 @@ EXPORT void CALL PluginLoaded(void)
|
|||
{
|
||||
PluginInit();
|
||||
WriteTrace(TraceAudioInterface, TraceDebug, "Called");
|
||||
if (g_settings != NULL)
|
||||
{
|
||||
g_settings->SetSyncViaAudioEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void CALL AiDacrateChanged(int SystemType)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
CSettings * g_settings = NULL;
|
||||
|
||||
CSettings::CSettings() :
|
||||
m_Set_SyncViaAudioEnabled(0),
|
||||
m_Set_EnableAudio(0),
|
||||
m_Set_FixedAudio(0),
|
||||
m_Set_SyncAudio(0),
|
||||
|
@ -81,11 +82,7 @@ CSettings::~CSettings()
|
|||
void CSettings::RegisterSettings(void)
|
||||
{
|
||||
SetModuleName("default");
|
||||
short Set_SyncViaAudioEnabled = FindSystemSettingId("SyncViaAudioEnabled");
|
||||
if (Set_SyncViaAudioEnabled != 0)
|
||||
{
|
||||
SetSystemSetting(Set_SyncViaAudioEnabled, 1);
|
||||
}
|
||||
m_Set_SyncViaAudioEnabled = FindSystemSettingId("SyncViaAudioEnabled");
|
||||
m_Set_EnableAudio = FindSystemSettingId("Enable Audio");
|
||||
m_Set_FixedAudio = FindSystemSettingId("Fixed Audio");
|
||||
m_Set_SyncAudio = FindSystemSettingId("Sync Audio");
|
||||
|
@ -109,6 +106,14 @@ void CSettings::RegisterSettings(void)
|
|||
LogLevelChanged();
|
||||
}
|
||||
|
||||
void CSettings::SetSyncViaAudioEnabled(bool Enabled)
|
||||
{
|
||||
if (m_Set_SyncViaAudioEnabled != 0)
|
||||
{
|
||||
SetSystemSetting(m_Set_SyncViaAudioEnabled, Enabled ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
void CSettings::SetAudioEnabled(bool Enabled)
|
||||
{
|
||||
if (m_Set_EnableAudio != 0)
|
||||
|
|
|
@ -26,8 +26,9 @@ public:
|
|||
inline bool FlushLogs(void) const { return m_FlushLogs; }
|
||||
inline const char * log_dir(void) const { return m_log_dir; }
|
||||
|
||||
void SetAudioEnabled(bool Enabled);
|
||||
void SetVolume(uint32_t Volume);
|
||||
void SetSyncViaAudioEnabled(bool Enabled);
|
||||
void SetAudioEnabled(bool Enabled);
|
||||
void SetVolume(uint32_t Volume);
|
||||
void SetTinyBuffer(bool TinyBuffer);
|
||||
void SetFPSBuffer(bool FPSBuffer);
|
||||
void ReadSettings();
|
||||
|
@ -45,8 +46,9 @@ private:
|
|||
void RegisterSettings(void);
|
||||
void LogLevelChanged(void);
|
||||
|
||||
short m_Set_EnableAudio;
|
||||
short m_Set_FixedAudio;
|
||||
short m_Set_SyncViaAudioEnabled;
|
||||
short m_Set_EnableAudio;
|
||||
short m_Set_FixedAudio;
|
||||
short m_Set_SyncAudio;
|
||||
short m_Set_FullSpeed;
|
||||
short m_Set_LimitFPS;
|
||||
|
|
|
@ -354,8 +354,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(STR_FR_VIS, "Vertical interrupts per second");
|
||||
DEF_STR(STR_FR_DLS, "Display lists per second");
|
||||
DEF_STR(STR_FR_PERCENT, "Percentage of full speed");
|
||||
DEF_STR(STR_FR_DLS_VIS, "VI/s & DL/s");
|
||||
DEF_STR(STR_FR_NONE, "None");
|
||||
DEF_STR(STR_FR_DLS_VIS, "VI/s & DL/s");
|
||||
|
||||
// Increase speed
|
||||
DEF_STR(STR_INSREASE_SPEED, "Increase Game Speed");
|
||||
|
|
|
@ -45,7 +45,7 @@ enum CPU_TYPE
|
|||
|
||||
enum FRAMERATE_TYPE
|
||||
{
|
||||
FR_VIs = 0, FR_DLs = 1, FR_PERCENT = 2, FR_VIs_DLs = 3, FR_None = 4,
|
||||
FR_VIs = 0, FR_DLs = 1, FR_PERCENT = 2, FR_VIs_DLs = 3,
|
||||
};
|
||||
|
||||
enum SAVE_CHIP_TYPE
|
||||
|
|
|
@ -37,6 +37,8 @@ CAudioPlugin::~CAudioPlugin()
|
|||
|
||||
bool CAudioPlugin::LoadFunctions(void)
|
||||
{
|
||||
g_Settings->SaveBool(Setting_SyncViaAudioEnabled, false);
|
||||
|
||||
// Find entries for functions in DLL
|
||||
void(CALL *InitiateAudio)(void);
|
||||
LoadFunction(InitiateAudio);
|
||||
|
@ -62,7 +64,6 @@ bool CAudioPlugin::LoadFunctions(void)
|
|||
|
||||
bool CAudioPlugin::Initiate(CN64System * System, RenderWindow * Window)
|
||||
{
|
||||
g_Settings->SaveBool(Setting_SyncViaAudioEnabled, false);
|
||||
struct AUDIO_INFO
|
||||
{
|
||||
void * hwnd;
|
||||
|
|
|
@ -363,6 +363,11 @@ bool CPlugins::Reset(CN64System * System)
|
|||
if (!m_RSP->Initiate(this, System)) { return false; }
|
||||
WriteTrace(TraceRSPPlugin, TraceDebug, "RSP Initiate Done");
|
||||
}
|
||||
|
||||
if (System)
|
||||
{
|
||||
System->RefreshSyncToAudio();
|
||||
}
|
||||
WriteTrace(TracePlugins, TraceDebug, "Done");
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -241,12 +241,8 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
|
||||
//User Interface
|
||||
AddHandler(UserInterface_ShowCPUPer, new CSettingTypeApplication("Settings", "Display CPU Usage", (uint32_t)false));
|
||||
#ifdef ANDROID
|
||||
AddHandler(UserInterface_DisplayFrameRate, new CSettingTypeApplication("Settings", "Display Frame Rate", (uint32_t)false));
|
||||
#else
|
||||
AddHandler(UserInterface_DisplayFrameRate, new CSettingTypeApplication("Settings", "Display Frame Rate", (uint32_t)true));
|
||||
#endif
|
||||
AddHandler(UserInterface_FrameDisplayType, new CSettingTypeApplication("Settings", "Frame Rate Display Type", (uint32_t)FR_None));
|
||||
AddHandler(UserInterface_FrameDisplayType, new CSettingTypeApplication("Settings", "Frame Rate Display Type", (uint32_t)FR_VIs));
|
||||
AddHandler(Directory_Plugin, new CSettingTypeSelectedDirectory("Dir:Plugin", Directory_PluginInitial, Directory_PluginSelected, Directory_PluginUseSelected, Directory_Plugin));
|
||||
#ifndef _M_X64
|
||||
AddHandler(Directory_PluginInitial, new CSettingTypeRelativePath("Plugin", ""));
|
||||
|
|
|
@ -57,7 +57,6 @@ void CGameSettings::RefreshGameSettings()
|
|||
m_DelaySI = g_Settings->LoadBool(Game_DelaySI);
|
||||
m_DelayDP = g_Settings->LoadBool(Game_DelayDP);
|
||||
m_bFixedAudio = g_Settings->LoadBool(Game_FixedAudio);
|
||||
m_bSyncToAudio = g_Settings->LoadBool(Game_SyncViaAudio) && g_Settings->LoadBool(Setting_SyncViaAudioEnabled);
|
||||
m_FullSpeed = g_Settings->LoadBool(Game_FullSpeed);
|
||||
m_b32Bit = g_Settings->LoadBool(Game_32Bit);
|
||||
#ifdef ANDROID
|
||||
|
@ -79,6 +78,7 @@ void CGameSettings::RefreshGameSettings()
|
|||
}
|
||||
if (m_OverClockModifier < 1) { m_OverClockModifier = 1; }
|
||||
if (m_OverClockModifier > 20) { m_OverClockModifier = 20; }
|
||||
RefreshSyncToAudio();
|
||||
WriteTrace(TraceN64System, TraceDebug, "Done");
|
||||
}
|
||||
|
||||
|
@ -87,3 +87,8 @@ void CGameSettings::SpeedChanged(int SpeedLimit)
|
|||
m_FullSpeed = (g_System->m_SystemType == SYSTEM_PAL ? 50 : 60) == SpeedLimit;
|
||||
g_Settings->SaveBool(Game_FullSpeed, m_FullSpeed);
|
||||
}
|
||||
|
||||
void CGameSettings::RefreshSyncToAudio(void)
|
||||
{
|
||||
m_bSyncToAudio = g_Settings->LoadBool(Game_SyncViaAudio) && g_Settings->LoadBool(Setting_SyncViaAudioEnabled);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ public:
|
|||
inline static CPU_TYPE CpuType(void) { return m_CpuType; }
|
||||
inline static uint32_t OverClockModifier(void) { return m_OverClockModifier; }
|
||||
|
||||
void RefreshSyncToAudio(void);
|
||||
|
||||
protected:
|
||||
static void SpeedChanged(int32_t SpeedLimit);
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ void RegisterUISettings (void)
|
|||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportFile_ShortCutsDefault), new CSettingTypeRelativePath("Config", "Project64.sc3"));
|
||||
|
||||
//Settings location
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_PluginPageFirst), new CSettingTypeApplication("", "Plugin Page First", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_DisableScrSaver), new CSettingTypeApplication("", "Disable Screen Saver", (uint32_t)true));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_AutoSleep), new CSettingTypeApplication("", "Auto Sleep", (uint32_t)true));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_AutoFullscreen), new CSettingTypeApplication("", "Auto Full Screen", (uint32_t)false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_PluginPageFirst), new CSettingTypeApplication("Settings", "Plugin Page First", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_DisableScrSaver), new CSettingTypeApplication("Settings", "Disable Screen Saver", (uint32_t)true));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_AutoSleep), new CSettingTypeApplication("Settings", "Auto Sleep", (uint32_t)true));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Setting_AutoFullscreen), new CSettingTypeApplication("Settings", "Auto Full Screen", (uint32_t)false));
|
||||
|
||||
//RDB Settings
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Rdb_Status), new CSettingTypeRomDatabase("Status", "Unknown"));
|
||||
|
|
|
@ -124,6 +124,7 @@ LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARA
|
|||
m_bIgnoreAddrChange = true;
|
||||
m_AddressEdit.SetValue(0x80000000, false, true);
|
||||
ShowAddress(0x80000000, TRUE);
|
||||
m_bIgnoreAddrChange = false;
|
||||
|
||||
if (isStepping())
|
||||
{
|
||||
|
@ -1253,7 +1254,7 @@ void CDebugCommandsView::GotoEnteredAddress()
|
|||
void CDebugCommandsView::BeginOpEdit(uint32_t address)
|
||||
{
|
||||
uint32_t opcode;
|
||||
if (m_Debugger->DebugLW_VAddr(address, opcode))
|
||||
if (!m_Debugger->DebugLW_VAddr(address, opcode))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -45,9 +45,8 @@ CAdvancedOptionsPage::CAdvancedOptionsPage(HWND hParent, const RECT & rcDispay)
|
|||
ComboBox->AddItemW(wGS(STR_FR_VIS).c_str(), FR_VIs);
|
||||
ComboBox->AddItemW(wGS(STR_FR_DLS).c_str(), FR_DLs);
|
||||
ComboBox->AddItemW(wGS(STR_FR_PERCENT).c_str(), FR_PERCENT);
|
||||
ComboBox->AddItemW(wGS(STR_FR_DLS_VIS).c_str(), FR_VIs_DLs);
|
||||
ComboBox->AddItemW(wGS(STR_FR_NONE).c_str(), FR_None);
|
||||
}
|
||||
ComboBox->AddItemW(wGS(STR_FR_DLS_VIS).c_str(), FR_VIs_DLs);
|
||||
}
|
||||
|
||||
m_IplDir.Attach(GetDlgItem(IDC_IPL_DIR));
|
||||
|
||||
|
|
Loading…
Reference in New Issue