From b9cdcb18198caabf1a1640e48c0f2cea954edeba Mon Sep 17 00:00:00 2001 From: nakeee Date: Wed, 13 May 2009 22:23:54 +0000 Subject: [PATCH] added HAVE_SFML so the code compiles without it git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3221 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Common.h | 1 + .../Core/Src/HW/SI_DeviceGCController.cpp | 4 ++- Source/Core/DolphinWX/Src/Frame.h | 8 ++---- Source/Core/DolphinWX/Src/FrameTools.cpp | 27 ++++++++++--------- Source/Core/DolphinWX/Src/SConscript | 8 +++++- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 096776389d..add19817d2 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -82,6 +82,7 @@ // Since they are always around on windows #define HAVE_WIIUSE 1 #define HAVE_WX 1 + #define HAVE_SFML 1 // #define HAVE_OPENAL 1 namespace diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp index 6e899f327a..22879bc66d 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp +++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp @@ -127,6 +127,8 @@ CSIDevice_GCController::GetData(u32& _Hi, u32& _Low) memset(&PadStatus, 0, sizeof(PadStatus)); Common::PluginPAD* pad = CPluginManager::GetInstance().GetPad(ISIDevice::m_iDeviceNumber); pad->PAD_GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus); + +#if defined(HAVE_SFML) && HAVE_SFML int NetPlay = GetNetInput(ISIDevice::m_iDeviceNumber, PadStatus, netValues); if (NetPlay != 2) @@ -140,7 +142,7 @@ CSIDevice_GCController::GetData(u32& _Hi, u32& _Low) else return false; } - +#endif _Hi = (u32)((u8)PadStatus.stickY); _Hi |= (u32)((u8)PadStatus.stickX << 8); _Hi |= (u32)((u16)PadStatus.button << 16); diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 4a7ab19f16..cdffb1db48 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -16,9 +16,6 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////// -// Includes -// ¯¯¯¯¯¯¯¯¯¯ #ifndef __FRAME_H_ #define __FRAME_H_ @@ -26,12 +23,11 @@ #include #include #include -//////////////////////////////// + #include "CDUtils.h" #include "LogWindow.h" -////////////////////////////////////////////////////////////////////////// + // A shortcut to access the bitmaps -// ¯¯¯¯¯¯¯¯¯¯ #define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name)) inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length) { diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 8fea012f08..77c8941fdc 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -17,24 +17,21 @@ -////////////////////////////////////////////////////////////////////////////////////////// // Windows -/* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -CFrame is the main parent window. Inside CFrame there is m_Panel which is the parent for -the rendering window (when we render to the main window). In Windows the rendering window is -created by giving CreateWindow() m_Panel->GetHandle() as parent window and creating a new -child window to m_Panel. The new child window handle that is returned by CreateWindow() can -be accessed from Core::GetWindowHandle(). - -///////////////////////////////////////////////*/ +/* +CFrame is the main parent window. Inside CFrame there is m_Panel which is the +parent for the rendering window (when we render to the main window). In Windows +the rendering window is created by giving CreateWindow() m_Panel->GetHandle() +as parent window and creating a new child window to m_Panel. The new child +window handle that is returned by CreateWindow() can be accessed from +Core::GetWindowHandle(). +*/ -// ---------------------------------------------------------------------------- -// Includes -// ---------------------------------------------------------------------------- - +#if defined(HAVE_SFML) && HAVE_SFML #include "NetWindow.h" +#endif #include "Globals.h" // Local #include "Frame.h" @@ -654,9 +651,13 @@ void CFrame::OnHelp(wxCommandEvent& event) // NetPlay stuff void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event)) { +#if defined(HAVE_SFML) && HAVE_SFML + new NetPlay(this, m_GameListCtrl->GetGamePaths(), m_GameListCtrl->GetGameNames()); +#endif } + // Miscellaneous menu void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event)) { diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index c7cd9006d5..e9193aa82a 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -43,7 +43,13 @@ if wxenv['HAVE_WX']: ], libs = [ 'debwx' ] + libs - +if wxenv['HAVE_SFML']: + files += [ + 'NetEvent.cpp', + 'NetFunctions.cpp', + 'NetSockets.cpp', + 'NetWindow.cpp', + ] if wxenv['HAVE_COCOA']: files += [ 'cocoaApp.m', ]