mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
A compile fix for Linux/OSX in InfoWindow.cpp and also get OSX to stop crashing from loading the audio backend. It's a pretty bad way to do it, but I couldn't find another way. Now to figure out why SMS looks horrible in OSX
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3074 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
989e2590a2
commit
264737fede
@ -1,5 +1,4 @@
|
||||
#include "AudioCommon.h"
|
||||
|
||||
AudioCommonConfig ac_Config;
|
||||
|
||||
// Load from given file
|
||||
@ -8,6 +7,10 @@ void AudioCommonConfig::Load(IniFile &file) {
|
||||
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
|
||||
#ifdef _WIN32
|
||||
file.Get("Config", "Backend", &sBackend, "DSound");
|
||||
#elif defined(__APPLE__)
|
||||
std::string temp;
|
||||
file.Get("Config", "Backend", &temp, "AOSound");
|
||||
strncpy(sBackend, temp.c_str(), 128);
|
||||
#else
|
||||
file.Get("Config", "Backend", &sBackend, "AOSound");
|
||||
#endif
|
||||
@ -17,7 +20,7 @@ void AudioCommonConfig::Load(IniFile &file) {
|
||||
void AudioCommonConfig::Set(IniFile &file) {
|
||||
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
||||
file.Set("Config", "EnableThrottle", m_EnableThrottle);
|
||||
file.Set("Config", "Backend", sBackend.c_str());
|
||||
file.Set("Config", "Backend", sBackend);
|
||||
}
|
||||
|
||||
// Update according to the values (stream/mixer)
|
||||
|
@ -9,12 +9,15 @@
|
||||
#define BACKEND_AOSOUND "AOSound"
|
||||
#define BACKEND_OPENAL "OpenAL"
|
||||
#define BACKEND_NULL "NullSound"
|
||||
|
||||
struct AudioCommonConfig
|
||||
{
|
||||
bool m_EnableDTKMusic;
|
||||
bool m_EnableThrottle;
|
||||
#ifdef __APPLE__
|
||||
char sBackend[128];
|
||||
#else
|
||||
std::string sBackend;
|
||||
#endif
|
||||
|
||||
// Load from given file
|
||||
void Load(IniFile &file);
|
||||
|
@ -417,7 +417,7 @@ void IniFile::Set(const char* sectionName, const char* key, bool newValue)
|
||||
bool IniFile::Get(const char* sectionName, const char* key, std::string* value, const char* defaultValue)
|
||||
{
|
||||
Section* section = GetSection(sectionName);
|
||||
|
||||
|
||||
if (!section)
|
||||
{
|
||||
if (defaultValue)
|
||||
|
@ -65,7 +65,7 @@ void wxInfoWindow::Init_ChildControls()
|
||||
m_Tab_Log = new wxPanel(m_Notebook_Main, ID_TAB_LOG, wxDefaultPosition, wxDefaultSize);
|
||||
m_TextCtrl_Log = new wxTextCtrl(m_Tab_Log,
|
||||
ID_TEXTCTRL_LOG,
|
||||
wxT(
|
||||
wxString::FromAscii(std::string(
|
||||
//Dolphin revision number
|
||||
|
||||
std::string("Dolphin Revision: ") + SVN_REV_STR +"\n"+
|
||||
@ -80,7 +80,7 @@ void wxInfoWindow::Init_ChildControls()
|
||||
//CPU Info
|
||||
std::string("Processor Information:\n")+cpu_info.Summarize()+"\n\n"
|
||||
|
||||
),
|
||||
).c_str()),
|
||||
wxDefaultPosition, wxSize(100, 600),
|
||||
wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
|
||||
|
||||
|
@ -81,7 +81,11 @@ void ConfigDialog::AddBackend(const char* backend)
|
||||
{
|
||||
m_BackendSelection->Append(wxString::FromAscii(backend));
|
||||
// Update value
|
||||
#ifdef __APPLE__
|
||||
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend));
|
||||
#else
|
||||
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
#endif
|
||||
}
|
||||
|
||||
ConfigDialog::~ConfigDialog()
|
||||
@ -93,7 +97,11 @@ void ConfigDialog::SettingsChanged(wxCommandEvent& event)
|
||||
g_Config.m_EnableHLEAudio = m_buttonEnableHLEAudio->GetValue();
|
||||
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
|
||||
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
|
||||
#ifdef __APPLE__
|
||||
strncpy(ac_Config.sBackend, m_BackendSelection->GetValue().mb_str(), 128);
|
||||
#else
|
||||
ac_Config.sBackend = m_BackendSelection->GetValue().mb_str();
|
||||
#endif
|
||||
g_Config.Save();
|
||||
|
||||
if (event.GetId() == wxID_OK)
|
||||
|
@ -76,7 +76,11 @@ void DSPConfigDialogLLE::AddBackend(const char* backend)
|
||||
{
|
||||
m_BackendSelection->Append(wxString::FromAscii(backend));
|
||||
// Update value
|
||||
#ifdef __APPLE__
|
||||
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend));
|
||||
#else
|
||||
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
#endif
|
||||
}
|
||||
|
||||
DSPConfigDialogLLE::~DSPConfigDialogLLE()
|
||||
@ -87,7 +91,11 @@ void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
|
||||
{
|
||||
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
|
||||
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
|
||||
#ifdef __APPLE__
|
||||
strncpy(ac_Config.sBackend, m_BackendSelection->GetValue().mb_str(), 128);
|
||||
#else
|
||||
ac_Config.sBackend = m_BackendSelection->GetValue().mb_str();
|
||||
#endif
|
||||
ac_Config.Update();
|
||||
g_Config.Save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user