Skip to content

Commit

Permalink
Make a few settings in spu2-x stick under Linux. The whole config sec…
Browse files Browse the repository at this point in the history
…tion should probably be rewritten, but that's for a later date.
  • Loading branch information
arcum42 committed Sep 3, 2020
1 parent 19f153a commit a1d6cb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/spu2-x/src/Linux/Config.cpp
Expand Up @@ -153,6 +153,7 @@ void ReadSettings()

SndOutLatencyMS = CfgReadInt(L"OUTPUT", L"Latency", 300);
SynchMode = CfgReadInt(L"OUTPUT", L"Synch_Mode", 0);
numSpeakers = CfgReadInt(L"OUTPUT", L"SpeakerConfiguration", 0);

#ifdef SPU2X_PORTAUDIO
PortaudioOut->ReadSettings();
Expand Down Expand Up @@ -205,6 +206,7 @@ void WriteSettings()
CfgWriteStr(L"OUTPUT", L"Output_Module", mods[OutputModule]->GetIdent());
CfgWriteInt(L"OUTPUT", L"Latency", SndOutLatencyMS);
CfgWriteInt(L"OUTPUT", L"Synch_Mode", SynchMode);
CfgWriteInt(L"OUTPUT", L"SpeakerConfiguration", numSpeakers);
CfgWriteInt(L"DEBUG", L"DelayCycles", delayCycles);

#ifdef SPU2X_PORTAUDIO
Expand Down
8 changes: 8 additions & 0 deletions plugins/spu2-x/src/wx/wxConfig.cpp
Expand Up @@ -245,10 +245,18 @@ void Dialog::SaveValues()
{
Interpolation = m_inter_select->GetSelection();
OutputModule = m_module_select->GetSelection();

#ifdef SPU2X_PORTAUDIO
OutputAPI = m_portaudio_select->GetSelection();
wxString p_api(m_portaudio_select->GetStringSelection());
if (p_api.Find("ALSA") != wxNOT_FOUND) p_api = "ALSA";
if (p_api.Find("OSS") != wxNOT_FOUND) p_api = "OSS";
PortaudioOut->SetApiSettings(p_api);
#endif

SdlOutputAPI = m_sdl_select->GetSelection();
SDLOut->SetApiSettings(m_sdl_select->GetStringSelection());

SynchMode = m_sync_select->GetSelection();
numSpeakers = m_audio_select->GetSelection();

Expand Down

0 comments on commit a1d6cb2

Please sign in to comment.