summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonicadvance1 <sonicadvance1@gmail.com>2008-10-09 08:51:57 +0000
committerSonicadvance1 <sonicadvance1@gmail.com>2008-10-09 08:51:57 +0000
commite1eb51a01034348f3eeb94f2e951a1665b5c641b (patch)
tree129c37e9191527adb7770cbeeb8f1fc26721b72d
parentc343b8b8bbd39b748fa4b17ace1027490de18e70 (diff)
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
-rw-r--r--Source/Core/Common/Src/Common.h5
-rw-r--r--Source/Core/Common/Src/SConscript1
-rw-r--r--Source/Core/Common/Src/StringUtil.cpp2
-rw-r--r--Source/Core/Common/Src/Thread.cpp2
-rw-r--r--Source/Core/Core/Src/Boot/Boot.cpp2
-rw-r--r--Source/Core/Core/Src/HW/CommandProcessor.cpp6
-rw-r--r--Source/Core/DolphinWX/Src/FilesystemViewer.cpp14
-rw-r--r--Source/Core/VideoCommon/Src/Fifo.cpp7
-rw-r--r--Source/Plugins/Plugin_Wiimote_Test/Src/SConscript2
9 files changed, 23 insertions, 18 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 43ca8d25e1..234334d3c6 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -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)
diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript
index 9bc27b69c4..67d7218da5 100644
--- a/Source/Core/Common/Src/SConscript
+++ b/Source/Core/Common/Src/SConscript
@@ -22,6 +22,7 @@ files = [
"Thunk.cpp",
"Timer.cpp",
"Thread.cpp",
+ "WaveFile.cpp",
"x64Emitter.cpp",
"x64Analyzer.cpp",
]
diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp
index 2a3345f512..133d2fb515 100644
--- a/Source/Core/Common/Src/StringUtil.cpp
+++ b/Source/Core/Common/Src/StringUtil.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
diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp
index db02b4598e..7254caf539 100644
--- a/Source/Core/Common/Src/Thread.cpp
+++ b/Source/Core/Common/Src/Thread.cpp
@@ -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
}
diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp
index 3985438eda..fd5ba34d84 100644
--- a/Source/Core/Core/Src/Boot/Boot.cpp
+++ b/Source/Core/Core/Src/Boot/Boot.cpp
@@ -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());
}
}
diff --git a/Source/Core/Core/Src/HW/CommandProcessor.cpp b/Source/Core/Core/Src/HW/CommandProcessor.cpp
index f840289664..87904e3e72 100644
--- a/Source/Core/Core/Src/HW/CommandProcessor.cpp
+++ b/Source/Core/Core/Src/HW/CommandProcessor.cpp
@@ -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);
diff --git a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp
index 118edb881e..0b5b56bb9c 100644
--- a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp
+++ b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp
@@ -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
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp
index 642959c8f3..09b927351f 100644
--- a/Source/Core/VideoCommon/Src/Fifo.cpp
+++ b/Source/Core/VideoCommon/Src/Fifo.cpp
@@ -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
diff --git a/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript b/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript
index 4e216304cd..c08754747c 100644
--- a/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript
+++ b/Source/Plugins/Plugin_Wiimote_Test/Src/SConscript
@@ -9,7 +9,7 @@ else:
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote.so"
files = [
- "Wiimote_Test.cpp",
+ "Wiimote.cpp",
]
padenv = env.Clone()