Linux build fixes and some warning cleanup for GCC

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2406 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2009-02-24 05:20:52 +00:00
parent 3d9b3ba117
commit 8c93e39ddd
25 changed files with 67 additions and 43 deletions

View File

@ -83,4 +83,5 @@ public:
} }
}; };
#endif // _FIXED_SIZE_QUEUE_H #endif // _FIXED_SIZE_QUEUE_H

View File

@ -66,4 +66,5 @@
/////////////////////////// ///////////////////////////
#endif // __SETUP_h__ #endif // __SETUP_h__

View File

@ -414,7 +414,7 @@ Thread::~Thread()
} }
void Thread::WaitForDeath(const int _Wait) void Thread::WaitForDeath()
{ {
if (thread_id) if (thread_id)
{ {

View File

@ -37,7 +37,6 @@
#include "Common.h" #include "Common.h"
/////////////////////////////////// ///////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
// Definitions // Definitions
// ------------ // ------------
@ -89,7 +88,11 @@ public:
void SetAffinity(int mask); void SetAffinity(int mask);
static void SetCurrentThreadAffinity(int mask); static void SetCurrentThreadAffinity(int mask);
#ifdef _WIN32
void WaitForDeath(const int _Wait = INFINITE); void WaitForDeath(const int _Wait = INFINITE);
#else
void WaitForDeath();
#endif
private: private:

View File

@ -32,4 +32,5 @@ struct STileMetaContent
// [TODO]: this global internal stuff sux... the whole data should be inside the ES // [TODO]: this global internal stuff sux... the whole data should be inside the ES
// but this is the easiest way atm // but this is the easiest way atm
extern std::vector<STileMetaContent> m_TileMetaContent; extern std::vector<STileMetaContent> m_TileMetaContent;

View File

@ -302,7 +302,11 @@ void Stop()
if (GetParent((HWND)g_pWindowHandle) == NULL) if (GetParent((HWND)g_pWindowHandle) == NULL)
#endif #endif
#ifndef SETUP_TIMER_WAITING // This is moved #ifndef SETUP_TIMER_WAITING // This is moved
#ifdef _WIN32
g_EmuThread->WaitForDeath(5000); g_EmuThread->WaitForDeath(5000);
#else
g_EmuThread->WaitForDeath();
#endif
delete g_EmuThread; // Wait for emuthread to close. delete g_EmuThread; // Wait for emuthread to close.
g_EmuThread = 0; g_EmuThread = 0;
#endif #endif
@ -575,7 +579,11 @@ void EmuThreadEnd()
if (cpuThread) if (cpuThread)
{ {
// There is a CPU thread - join it. // There is a CPU thread - join it.
#ifdef _WIN32
cpuThread->WaitForDeath(5000); cpuThread->WaitForDeath(5000);
#else
cpuThread->WaitForDeath();
#endif
delete cpuThread; delete cpuThread;
// Returns after game exited // Returns after game exited
cpuThread = NULL; cpuThread = NULL;

View File

@ -40,4 +40,5 @@ void SetSourcePath(const std::string path)
{ {
sourcePath = path; sourcePath = path;
} }
} }

View File

@ -28,4 +28,5 @@ namespace SDInterface
void SetSourcePath(const std::string path); void SetSourcePath(const std::string path);
} }
#endif #endif

View File

@ -127,4 +127,5 @@ class wxCheatsWindow : public wxFrame
void OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& event); void OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& event);
}; };
#endif #endif

View File

@ -281,7 +281,6 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1); wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
break; break;
} }
SetItem(_Index, COLUMN_COMPANY, wxString::From8BitData(rISOFile.GetCompany().c_str()), -1); SetItem(_Index, COLUMN_COMPANY, wxString::From8BitData(rISOFile.GetCompany().c_str()), -1);
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1); SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
@ -942,4 +941,5 @@ bool CGameListCtrl::CopySJISToString( wxString& _rDestination, const char* _src
//returnCode = true; //returnCode = true;
#endif #endif
return returnCode; return returnCode;
} }

View File

@ -60,4 +60,5 @@ void wxSDCardWindow::OnEvent_Window_Close(wxCloseEvent& WXUNUSED(event))
void wxSDCardWindow::OnEvent_ButtonClose_Press(wxCommandEvent& WXUNUSED(event)) void wxSDCardWindow::OnEvent_ButtonClose_Press(wxCommandEvent& WXUNUSED(event))
{ {
EndModal(0); EndModal(0);
} }

View File

@ -42,4 +42,5 @@ protected:
}; };
#endif #endif

View File

@ -249,4 +249,5 @@ std::string VKToString(int keycode)
#endif #endif
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
} }

View File

@ -363,4 +363,5 @@ void GetButton(SDL_Joystick *joy, int ControllerID, int buttons, int axes, int h
} // InputCommon } // InputCommon

View File

@ -42,4 +42,5 @@ bool IsConnected(int Controller);
} // XInput } // XInput
#endif #endif

View File

@ -24,4 +24,5 @@ bool SaveTGA(const char* filename, int width, int height, void* pdata);
bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height); bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height);
bool SaveData(const char* filename, const char* pdata); bool SaveData(const char* filename, const char* pdata);
#endif // _IMAGEWRITE_H #endif // _IMAGEWRITE_H

View File

@ -23,4 +23,5 @@ namespace VertexManager
u8* s_pCurBufferPointer = NULL; u8* s_pCurBufferPointer = NULL;
} }

View File

@ -37,4 +37,5 @@ void CloseConsole();
#ifdef _WIN32 #ifdef _WIN32
HWND GetConsoleHwnd(void); HWND GetConsoleHwnd(void);
#endif #endif
///////////////////////////// /////////////////////////////

View File

@ -142,4 +142,5 @@ enum {
#endif #endif
#endif // win32 #endif // win32

View File

@ -27,4 +27,5 @@ void DrawMessages(); // draw the current messages on the screen. Only call once
} // namespace } // namespace
#endif #endif

View File

@ -35,4 +35,5 @@ void SetShaderParameters(u32 width, u32 height, u32 offsetX, u32 offsetY, float
} }
#endif #endif

View File

@ -26,6 +26,18 @@
#include "EmuDefinitions.h" // for PadMapping #include "EmuDefinitions.h" // for PadMapping
#include "main.h" #include "main.h"
// TODO: Figure out what to do for non-Win32
#ifndef _WIN32
#define VK_LEFT 0
#define VK_RIGHT 0
#define VK_UP 0
#define VK_DOWN 0
#define VK_NUMPAD4 0
#define VK_NUMPAD6 0
#define VK_NUMPAD8 0
#define VK_NUMPAD5 0
#endif
Config g_Config; Config g_Config;
Config::Config() Config::Config()
@ -65,7 +77,6 @@ void Config::Load(bool ChangePad)
iniFile.Get(TmpSection.c_str(), "IRHeight", &iIRHeight, BOTTOM - TOP); iniFile.Get(TmpSection.c_str(), "IRHeight", &iIRHeight, BOTTOM - TOP);
// Default controls // Default controls
#ifdef _WIN32
int WmA = 65, WmB = 66, int WmA = 65, WmB = 66,
Wm1 = 49, Wm2 = 50, Wm1 = 49, Wm2 = 50,
WmP = 80, WmM = 77, WmH = 72, WmP = 80, WmM = 77, WmH = 72,
@ -83,24 +94,6 @@ void Config::Load(bool ChangePad)
CcDl = VK_NUMPAD4, CcDu = VK_NUMPAD8, CcDr = VK_NUMPAD6, CcDd = VK_NUMPAD5, // Numpad CcDl = VK_NUMPAD4, CcDu = VK_NUMPAD8, CcDr = VK_NUMPAD6, CcDd = VK_NUMPAD5, // Numpad
CcLl = 0x4a, CcLu = 0x49, CcLr = 0x4c, CcLd = 0x4b, // J, I, L, K CcLl = 0x4a, CcLu = 0x49, CcLr = 0x4c, CcLd = 0x4b, // J, I, L, K
CcRl = 0x44, CcRu = 0x52, CcRr = 0x47, CcRd = 0x46; // D, R, G, F CcRl = 0x44, CcRu = 0x52, CcRr = 0x47, CcRd = 0x46; // D, R, G, F
#else
int WmA = 0, WmB = 0,
Wm1 = 0, Wm2 = 0,
WmP = 0, WmM = 0, WmH = 0,
WmL = 0, WmR = 0, WmU = 0, WmD = 0,
WmShake = 0,
WmPitchL = 0, WmPitchR = 0,
NcZ = 0, NcC = 0, NcL = 0, NcR = 0, NcU = 0, NcD = 0,
NcShake = 0,
CcA = 0, CcB = 0, CcX = 0, CcY = 0, // C, Z, X, Y
CcP = 0, CcM = 0, CcH = 0, // O instead of P, N instead of M, U instead of H
CcTl = 0, CcZl = 0, CcZr = 0, CcTr = 0, // 7, 8, 9, 0
CcDl = 0, CcDu = 0, CcDr = 0, CcDd = 0, // Numpad
CcLl = 0, CcLu = 0x49, CcLr = 0, CcLd = 0, // J, I, L, K
CcRl = 0, CcRu = 0x52, CcRr = 0, CcRd = 0; // D, R, G, F
#endif
for (int i = 0; i < 1; i++) for (int i = 0; i < 1; i++)
{ {

View File

@ -191,4 +191,5 @@ void GetJoyState(InputCommon::CONTROLLER_STATE_NEW &_PadState, InputCommon::CONT
//////////////////////////////////////////// ////////////////////////////////////////////
} // end of namespace WiiMoteEmu } // end of namespace WiiMoteEmu

View File

@ -36,4 +36,5 @@ void wiimote_decrypt(wiimote_key *key, u8 *data, int addr, u8 len);
void wiimote_gen_key(wiimote_key *key, u8 *keydata); void wiimote_gen_key(wiimote_key *key, u8 *keydata);
#endif #endif

View File

@ -37,4 +37,5 @@ void ClearScreen();
#endif #endif
/////////////////////////////// ///////////////////////////////
#endif // WIIMOTE_CONSOLE_H #endif // WIIMOTE_CONSOLE_H