Get the database reader working in Linux.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2985 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-05-12 10:25:43 +00:00
parent d24831f0d8
commit 5d7facfa15
4 changed files with 34 additions and 8 deletions

View File

@ -190,6 +190,10 @@ endif(SDL_FOUND)
# Subversion optional
find_package(Subversion)
# Liba52 optional
# Must be fixed properly
set(A52_LIBRARIES liba52.so)
# subversion found
if(Subversion_FOUND)
@ -298,17 +302,32 @@ endif(SOUNDTOUCH_FOUND)
#---------------------------------------
# zerogs
#---------------------------------------
# requires: -GLEW
# requires: -GLEW
# -OpenGL
# -X11
# -CG
#---------------------------------------
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
set(zerogs TRUE)
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
set(zerogs FALSE)
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
#---------------------------------------
#---------------------------------------
# zzogl-pg
#---------------------------------------
# requires: -GLEW
# -OpenGL
# -X11
# -CG
#---------------------------------------
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
set(zzogl TRUE)
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
set(zzogl FALSE)
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
#---------------------------------------
# zerospu2
#---------------------------------------

View File

@ -56,7 +56,10 @@ private:
if (doMsg) Console.Error("DataBase_Loader: Bad file data [%s]", line.c_str());
keyPair.key = "";
}
void extract(string& line, key_pair& keyPair) {
void extract(string& line, key_pair& keyPair) {
int eol = line.rfind("\r");
if (eol != string::npos) line = line.substr(0, eol);
stringstream ss(line);
string t;
keyPair.key = "";
@ -76,8 +79,9 @@ private:
doError(line, keyPair, true);
return;
}
keyPair.value = t;
for (;!ss.eof() && !ss.fail();) {
keyPair.value = t;
int temp = 0;
while (!ss.eof() && !ss.fail()) {
ss >> t;
if (isComment(t)) break;
keyPair.value += " ";

View File

@ -406,7 +406,8 @@ static __forceinline const wxChar* ChcrName(u32 addr)
}
}
static __forceinline const int ChannelNumber(u32 addr)
// Believe it or not, making this const can generate compiler warnings in gcc.
static __forceinline int ChannelNumber(u32 addr)
{
switch (addr)
{

View File

@ -205,6 +205,7 @@
<Unit filename="../Config.h" />
<Unit filename="../Counters.cpp" />
<Unit filename="../Counters.h" />
<Unit filename="../DataBase_Loader.h" />
<Unit filename="../DebugTools/Debug.h" />
<Unit filename="../DebugTools/DisASM.h" />
<Unit filename="../DebugTools/DisR3000A.cpp" />
@ -224,6 +225,7 @@
<Unit filename="../Elfheader.h" />
<Unit filename="../FPU.cpp" />
<Unit filename="../FiFo.cpp" />
<Unit filename="../File_Reader.h" />
<Unit filename="../GS.cpp" />
<Unit filename="../GS.h" />
<Unit filename="../GSState.cpp" />