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 // TODO: finish this
// Buttons // Buttons
#ifdef __linux__ #if defined HAVE_X11 && HAVE_X11
set_control(m_buttons, 0, "Click 1"); // A set_control(m_buttons, 0, "Click 1"); // A
set_control(m_buttons, 1, "Click 3"); // B set_control(m_buttons, 1, "Click 3"); // B
#else #else

View File

@ -399,10 +399,10 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
// title: 0xFF0000 // title: 0xFF0000
// company: 0x007030 // company: 0x007030
int ImageIndex = -1; int ImageIndex = -1;
#ifdef __linux__ #ifdef _WIN32
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#endif #endif
GameListItem& rISOFile = m_ISOFiles[_Index]; GameListItem& rISOFile = m_ISOFiles[_Index];
m_gamePath.append(rISOFile.GetFileName() + '\n'); m_gamePath.append(rISOFile.GetFileName() + '\n');
@ -597,13 +597,11 @@ void CGameListCtrl::ScanForISOs()
sprintf(tempstring,"Scanning %s", FileName.c_str()); sprintf(tempstring,"Scanning %s", FileName.c_str());
msg = wxString(tempstring, *wxConvCurrent); 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) // Update with the progress (i) and the message (msg)
bool Cont = dialog.Update(i, msg); bool Cont = dialog.Update(i, msg);
if (!Cont) if (!Cont)
break; break;
#endif
GameListItem ISOFile(rFilenames[i]); GameListItem ISOFile(rFilenames[i]);
if (ISOFile.IsValid()) if (ISOFile.IsValid())
{ {

View File

@ -1248,10 +1248,10 @@ void CISOProperties::ChangeBannerDetails(int lang)
|| OpenGameListItem->GetCountry() == DiscIO::IVolume::COUNTRY_TAIWAN || OpenGameListItem->GetCountry() == DiscIO::IVolume::COUNTRY_TAIWAN
|| OpenGameListItem->GetPlatform() == GameListItem::WII_WAD) || OpenGameListItem->GetPlatform() == GameListItem::WII_WAD)
{ {
#ifdef __linux__ #ifdef _WIN32
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#endif #endif
wxString name = wxString(OpenGameListItem->GetName(0).c_str(), SJISConv); 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) , Parent(parent) , m_LogAccess(true)
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL) , m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
, m_LogSection(1) , m_LogSection(1)
#ifdef __linux__ #ifdef _WIN32
, m_SJISConv(wxFONTENCODING_EUC_JP)
#else
, m_SJISConv(wxFONTENCODING_SHIFT_JIS) , m_SJISConv(wxFONTENCODING_SHIFT_JIS)
#else
, m_SJISConv(wxFONTENCODING_EUC_JP)
#endif #endif
{ {
m_LogManager = LogManager::GetInstance(); 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; if (!memoryCard[card]->DEntry_Comment2(j, comment)) comment[0]=0;
bool ascii = memoryCard[card]->IsAsciiEncoding(); bool ascii = memoryCard[card]->IsAsciiEncoding();
#ifdef __linux__ #ifdef _WIN32
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
#else
wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
#endif #endif
wxTitle = wxString(title, ascii ? *wxConvCurrent : SJISConv); wxTitle = wxString(title, ascii ? *wxConvCurrent : SJISConv);
wxComment = wxString(comment, ascii ? *wxConvCurrent : SJISConv); wxComment = wxString(comment, ascii ? *wxConvCurrent : SJISConv);

View File

@ -156,7 +156,7 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
void DSPDebuggerLLE::Refresh() void DSPDebuggerLLE::Refresh()
{ {
#ifdef __linux__ #if defined HAVE_X11 && HAVE_X11
if (!wxIsMainThread()) if (!wxIsMainThread())
wxMutexGuiEnter(); wxMutexGuiEnter();
#endif #endif
@ -165,7 +165,7 @@ void DSPDebuggerLLE::Refresh()
UpdateRegisterFlags(); UpdateRegisterFlags();
UpdateState(); UpdateState();
m_mgr.Update(); m_mgr.Update();
#ifdef __linux__ #if defined HAVE_X11 && HAVE_X11
if (!wxIsMainThread()) if (!wxIsMainThread())
wxMutexGuiLeave(); wxMutexGuiLeave();
#endif #endif