From b7767b63a35ea8ea65bb5510db1471e813194391 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sun, 9 Jan 2011 14:11:46 +0000 Subject: [PATCH] Generalize some __linux__ ifdefs for Unix/X11. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6793 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp | 2 +- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 10 ++++------ Source/Core/DolphinWX/Src/ISOProperties.cpp | 6 +++--- Source/Core/DolphinWX/Src/LogWindow.cpp | 6 +++--- Source/Core/DolphinWX/Src/MemcardManager.cpp | 6 +++--- .../Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp | 4 ++-- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index e34b587169..ddaf15c5c3 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -890,7 +890,7 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) // TODO: finish this // Buttons -#ifdef __linux__ +#if defined HAVE_X11 && HAVE_X11 set_control(m_buttons, 0, "Click 1"); // A set_control(m_buttons, 1, "Click 3"); // B #else diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 84298dd426..f0ee4c5df2 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -399,10 +399,10 @@ void CGameListCtrl::InsertItemInReportView(long _Index) // title: 0xFF0000 // company: 0x007030 int ImageIndex = -1; -#ifdef __linux__ - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); -#else +#ifdef _WIN32 wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); +#else + wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); #endif GameListItem& rISOFile = m_ISOFiles[_Index]; m_gamePath.append(rISOFile.GetFileName() + '\n'); @@ -597,13 +597,11 @@ void CGameListCtrl::ScanForISOs() sprintf(tempstring,"Scanning %s", FileName.c_str()); msg = wxString(tempstring, *wxConvCurrent); -// With wxWidgets 2.9.1, each Update() sleeps for several seconds -#if !wxCHECK_VERSION(2, 9, 1) || wxCHECK_VERSION(2, 9, 2) // Update with the progress (i) and the message (msg) bool Cont = dialog.Update(i, msg); if (!Cont) break; -#endif + GameListItem ISOFile(rFilenames[i]); if (ISOFile.IsValid()) { diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index e2cafbcdab..c8028ad301 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -1248,10 +1248,10 @@ void CISOProperties::ChangeBannerDetails(int lang) || OpenGameListItem->GetCountry() == DiscIO::IVolume::COUNTRY_TAIWAN || OpenGameListItem->GetPlatform() == GameListItem::WII_WAD) { -#ifdef __linux__ - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); -#else +#ifdef _WIN32 wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); +#else + wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); #endif wxString name = wxString(OpenGameListItem->GetName(0).c_str(), SJISConv); diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index 4a4cbcfbb0..3cba51a54e 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -48,10 +48,10 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos, , Parent(parent) , m_LogAccess(true) , m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL) , m_LogSection(1) -#ifdef __linux__ - , m_SJISConv(wxFONTENCODING_EUC_JP) -#else +#ifdef _WIN32 , m_SJISConv(wxFONTENCODING_SHIFT_JIS) +#else + , m_SJISConv(wxFONTENCODING_EUC_JP) #endif { m_LogManager = LogManager::GetInstance(); diff --git a/Source/Core/DolphinWX/Src/MemcardManager.cpp b/Source/Core/DolphinWX/Src/MemcardManager.cpp index 95f9ee720e..13546604d7 100644 --- a/Source/Core/DolphinWX/Src/MemcardManager.cpp +++ b/Source/Core/DolphinWX/Src/MemcardManager.cpp @@ -710,10 +710,10 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card) if (!memoryCard[card]->DEntry_Comment2(j, comment)) comment[0]=0; bool ascii = memoryCard[card]->IsAsciiEncoding(); -#ifdef __linux__ - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); -#else +#ifdef _WIN32 wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); +#else + wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); #endif wxTitle = wxString(title, ascii ? *wxConvCurrent : SJISConv); wxComment = wxString(comment, ascii ? *wxConvCurrent : SJISConv); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp index 155d0302c5..a3958cb02c 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp @@ -156,7 +156,7 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event) void DSPDebuggerLLE::Refresh() { -#ifdef __linux__ +#if defined HAVE_X11 && HAVE_X11 if (!wxIsMainThread()) wxMutexGuiEnter(); #endif @@ -165,7 +165,7 @@ void DSPDebuggerLLE::Refresh() UpdateRegisterFlags(); UpdateState(); m_mgr.Update(); -#ifdef __linux__ +#if defined HAVE_X11 && HAVE_X11 if (!wxIsMainThread()) wxMutexGuiLeave(); #endif