Generalize some __linux__ ifdefs for Unix/X11.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6793 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-01-09 14:11:46 +00:00
parent d4158f076a
commit b7767b63a3
6 changed files with 16 additions and 18 deletions

View File

@ -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

View File

@ -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())
{

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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