Fix Building in Linux, removed the define for _T() in Common.h so now we can have wx headers after including Common.h. Also, InterlockedExchange isn't in Linux so I just made it assign the variable
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@809 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c343b8b8bb
commit
e1eb51a010
|
@ -116,11 +116,6 @@ typedef union _LARGE_INTEGER
|
|||
#ifndef __forceinline
|
||||
#define __forceinline inline
|
||||
#endif
|
||||
|
||||
#ifndef _T
|
||||
#define _T(a) a
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (_M_IX86) && defined (_WIN32)
|
||||
|
|
|
@ -22,6 +22,7 @@ files = [
|
|||
"Thunk.cpp",
|
||||
"Timer.cpp",
|
||||
"Thread.cpp",
|
||||
"WaveFile.cpp",
|
||||
"x64Emitter.cpp",
|
||||
"x64Analyzer.cpp",
|
||||
]
|
||||
|
|
|
@ -387,7 +387,7 @@ void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _P
|
|||
// check for seperator
|
||||
if (_CompleteFilename[_CompleteFilename.size() - 1] != '\\')
|
||||
{
|
||||
_CompleteFilename += _T("\\");
|
||||
_CompleteFilename += "\\";
|
||||
}
|
||||
|
||||
// add the filename
|
||||
|
|
|
@ -350,7 +350,7 @@ int InterlockedExchangeAdd(int *Addend, int Increment)
|
|||
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||
return __sync_add_and_fetch(Addend, Increment);
|
||||
#else
|
||||
#error Sorry - GCC versions that don't support __sync_add_and_fetch are not supported.
|
||||
#error Sorry - GCC versions that does not support __sync_add_and_fetch are not supported.
|
||||
// TODO support old gcc
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game
|
|||
{
|
||||
if (_gameID != NULL)
|
||||
{
|
||||
BuildCompleteFilename(strMapFilename, _T("maps"), std::string(_gameID) + _T(".map"));
|
||||
BuildCompleteFilename(strMapFilename, "maps", std::string(_gameID) + ".map");
|
||||
success = g_symbolDB.LoadMap(strMapFilename.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -535,7 +535,11 @@ void UpdateFifoRegister()
|
|||
dist = wp - rp;
|
||||
else
|
||||
dist = (wp - fifo.CPBase) + (fifo.CPEnd - rp);
|
||||
InterlockedExchange((LONG*)&fifo.CPReadWriteDistance,dist);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&fifo.CPReadWriteDistance, dist);
|
||||
#else
|
||||
fifo.CPReadWriteDistance = dist;
|
||||
#endif
|
||||
//#ifdef _WIN32
|
||||
// not needed since we are already in the critical section in DC mode (see write16)
|
||||
// if (Core::g_CoreStartupParameter.bUseDualCore) LeaveCriticalSection(&fifo.sync);
|
||||
|
|
|
@ -55,7 +55,7 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
|
|||
wxTreeItemId dirId = NULL;
|
||||
for(u32 a = 1; a < Our_Files.size(); ++a)
|
||||
{
|
||||
m_Treectrl->AppendItem(RootId, wxString::Format("%s", Our_Files[a]->m_FullPath));
|
||||
m_Treectrl->AppendItem(RootId, wxString::Format(_T("%s"), Our_Files[a]->m_FullPath));
|
||||
|
||||
//if(Our_Files[a]->IsDirectory())
|
||||
}
|
||||
|
@ -66,23 +66,23 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
|
|||
m_Serial->SetValue(wxString(OpenISO->GetUniqueID().c_str(), wxConvUTF8));
|
||||
switch (OpenISO->GetCountry())
|
||||
{
|
||||
case OpenISO->COUNTRY_EUROPE:
|
||||
case OpenISO->COUNTRY_FRANCE:
|
||||
case DiscIO::IVolume::COUNTRY_EUROPE:
|
||||
case DiscIO::IVolume::COUNTRY_FRANCE:
|
||||
m_Country->SetValue(wxString::FromAscii("EUR"));
|
||||
break;
|
||||
case OpenISO->COUNTRY_USA:
|
||||
case DiscIO::IVolume::COUNTRY_USA:
|
||||
m_Country->SetValue(wxString::FromAscii("USA"));
|
||||
break;
|
||||
case OpenISO->COUNTRY_JAP:
|
||||
case DiscIO::IVolume::COUNTRY_JAP:
|
||||
m_Country->SetValue(wxString::FromAscii("JAP"));
|
||||
break;
|
||||
default:
|
||||
m_Country->SetValue(wxString::FromAscii("UNKNOWN"));
|
||||
break;
|
||||
}
|
||||
m_MakerID->SetValue(wxString::Format("0x%s", OpenISO->GetMakerID().c_str()));
|
||||
m_MakerID->SetValue(wxString::Format(_T("0x%s"), OpenISO->GetMakerID().c_str()));
|
||||
m_Date->SetValue(wxString(OpenISO->GetApploaderDate().c_str(), wxConvUTF8));
|
||||
m_TOC->SetValue(wxString::Format("%u", OpenISO->GetFSTSize()));
|
||||
m_TOC->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize()));
|
||||
|
||||
// Banner
|
||||
// ...all the BannerLoader functions are bool...gross
|
||||
|
|
|
@ -133,7 +133,11 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
if (_fifo.CPReadPointer == _fifo.CPBreakpoint)
|
||||
{
|
||||
//_fifo.bFF_Breakpoint = 1;
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.bFF_Breakpoint, true);
|
||||
#else
|
||||
_fifo.bFF_Breakpoint = true;
|
||||
#endif
|
||||
video_initialize.pUpdateInterrupts();
|
||||
break;
|
||||
}
|
||||
|
@ -151,11 +155,12 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
u32 readPtr = _fifo.CPReadPointer+32;
|
||||
if (readPtr >= _fifo.CPEnd)
|
||||
readPtr = _fifo.CPBase;
|
||||
InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
||||
InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -32);
|
||||
//LeaveCriticalSection(&_fifo.sync);
|
||||
#else
|
||||
_fifo.CPReadPointer = readPtr;
|
||||
Common::InterlockedExchangeAdd((int*)&_fifo.CPReadWriteDistance, -32);
|
||||
_fifo.sync->Leave();
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@ else:
|
|||
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote.so"
|
||||
|
||||
files = [
|
||||
"Wiimote_Test.cpp",
|
||||
"Wiimote.cpp",
|
||||
]
|
||||
|
||||
padenv = env.Clone()
|
||||
|
|
Loading…
Reference in New Issue