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
|
#ifndef __forceinline
|
||||||
#define __forceinline inline
|
#define __forceinline inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _T
|
|
||||||
#define _T(a) a
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_M_IX86) && defined (_WIN32)
|
#if defined (_M_IX86) && defined (_WIN32)
|
||||||
|
|
|
@ -22,6 +22,7 @@ files = [
|
||||||
"Thunk.cpp",
|
"Thunk.cpp",
|
||||||
"Timer.cpp",
|
"Timer.cpp",
|
||||||
"Thread.cpp",
|
"Thread.cpp",
|
||||||
|
"WaveFile.cpp",
|
||||||
"x64Emitter.cpp",
|
"x64Emitter.cpp",
|
||||||
"x64Analyzer.cpp",
|
"x64Analyzer.cpp",
|
||||||
]
|
]
|
||||||
|
|
|
@ -387,7 +387,7 @@ void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _P
|
||||||
// check for seperator
|
// check for seperator
|
||||||
if (_CompleteFilename[_CompleteFilename.size() - 1] != '\\')
|
if (_CompleteFilename[_CompleteFilename.size() - 1] != '\\')
|
||||||
{
|
{
|
||||||
_CompleteFilename += _T("\\");
|
_CompleteFilename += "\\";
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the filename
|
// 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__))
|
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||||
return __sync_add_and_fetch(Addend, Increment);
|
return __sync_add_and_fetch(Addend, Increment);
|
||||||
#else
|
#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
|
// TODO support old gcc
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game
|
||||||
{
|
{
|
||||||
if (_gameID != NULL)
|
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());
|
success = g_symbolDB.LoadMap(strMapFilename.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,7 +535,11 @@ void UpdateFifoRegister()
|
||||||
dist = wp - rp;
|
dist = wp - rp;
|
||||||
else
|
else
|
||||||
dist = (wp - fifo.CPBase) + (fifo.CPEnd - rp);
|
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
|
//#ifdef _WIN32
|
||||||
// not needed since we are already in the critical section in DC mode (see write16)
|
// not needed since we are already in the critical section in DC mode (see write16)
|
||||||
// if (Core::g_CoreStartupParameter.bUseDualCore) LeaveCriticalSection(&fifo.sync);
|
// if (Core::g_CoreStartupParameter.bUseDualCore) LeaveCriticalSection(&fifo.sync);
|
||||||
|
|
|
@ -55,7 +55,7 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
|
||||||
wxTreeItemId dirId = NULL;
|
wxTreeItemId dirId = NULL;
|
||||||
for(u32 a = 1; a < Our_Files.size(); ++a)
|
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())
|
//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));
|
m_Serial->SetValue(wxString(OpenISO->GetUniqueID().c_str(), wxConvUTF8));
|
||||||
switch (OpenISO->GetCountry())
|
switch (OpenISO->GetCountry())
|
||||||
{
|
{
|
||||||
case OpenISO->COUNTRY_EUROPE:
|
case DiscIO::IVolume::COUNTRY_EUROPE:
|
||||||
case OpenISO->COUNTRY_FRANCE:
|
case DiscIO::IVolume::COUNTRY_FRANCE:
|
||||||
m_Country->SetValue(wxString::FromAscii("EUR"));
|
m_Country->SetValue(wxString::FromAscii("EUR"));
|
||||||
break;
|
break;
|
||||||
case OpenISO->COUNTRY_USA:
|
case DiscIO::IVolume::COUNTRY_USA:
|
||||||
m_Country->SetValue(wxString::FromAscii("USA"));
|
m_Country->SetValue(wxString::FromAscii("USA"));
|
||||||
break;
|
break;
|
||||||
case OpenISO->COUNTRY_JAP:
|
case DiscIO::IVolume::COUNTRY_JAP:
|
||||||
m_Country->SetValue(wxString::FromAscii("JAP"));
|
m_Country->SetValue(wxString::FromAscii("JAP"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_Country->SetValue(wxString::FromAscii("UNKNOWN"));
|
m_Country->SetValue(wxString::FromAscii("UNKNOWN"));
|
||||||
break;
|
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_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
|
// Banner
|
||||||
// ...all the BannerLoader functions are bool...gross
|
// ...all the BannerLoader functions are bool...gross
|
||||||
|
|
|
@ -133,7 +133,11 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||||
if (_fifo.CPReadPointer == _fifo.CPBreakpoint)
|
if (_fifo.CPReadPointer == _fifo.CPBreakpoint)
|
||||||
{
|
{
|
||||||
//_fifo.bFF_Breakpoint = 1;
|
//_fifo.bFF_Breakpoint = 1;
|
||||||
|
#ifdef _WIN32
|
||||||
InterlockedExchange((LONG*)&_fifo.bFF_Breakpoint, true);
|
InterlockedExchange((LONG*)&_fifo.bFF_Breakpoint, true);
|
||||||
|
#else
|
||||||
|
_fifo.bFF_Breakpoint = true;
|
||||||
|
#endif
|
||||||
video_initialize.pUpdateInterrupts();
|
video_initialize.pUpdateInterrupts();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -151,11 +155,12 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||||
u32 readPtr = _fifo.CPReadPointer+32;
|
u32 readPtr = _fifo.CPReadPointer+32;
|
||||||
if (readPtr >= _fifo.CPEnd)
|
if (readPtr >= _fifo.CPEnd)
|
||||||
readPtr = _fifo.CPBase;
|
readPtr = _fifo.CPBase;
|
||||||
InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
||||||
InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -32);
|
InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -32);
|
||||||
//LeaveCriticalSection(&_fifo.sync);
|
//LeaveCriticalSection(&_fifo.sync);
|
||||||
#else
|
#else
|
||||||
|
_fifo.CPReadPointer = readPtr;
|
||||||
Common::InterlockedExchangeAdd((int*)&_fifo.CPReadWriteDistance, -32);
|
Common::InterlockedExchangeAdd((int*)&_fifo.CPReadWriteDistance, -32);
|
||||||
_fifo.sync->Leave();
|
_fifo.sync->Leave();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,7 +9,7 @@ else:
|
||||||
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote.so"
|
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote.so"
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
"Wiimote_Test.cpp",
|
"Wiimote.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
padenv = env.Clone()
|
padenv = env.Clone()
|
||||||
|
|
Loading…
Reference in New Issue