From 0becaa3223e57557b9d53bf1564d8da9eff0a64c Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 23 Aug 2008 08:42:52 +0000 Subject: [PATCH] Make sure SDL can hijack main() so it can do its initialisation. Only implemented for non-GUI executable so far. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@278 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/src/MainNoGUI.cpp | 5 ++++- Source/Core/DolphinWX/src/SConscript | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/src/MainNoGUI.cpp b/Source/Core/DolphinWX/src/MainNoGUI.cpp index 3822785fb6..76b2341c79 100644 --- a/Source/Core/DolphinWX/src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/src/MainNoGUI.cpp @@ -56,7 +56,10 @@ void Host_CloseDisplay(){} void Host_UpdateStatusBar(const char* _pText){} -int main(int argc, const char* argv[]) +// Include SDL header so it can hijack main(). +#include "SDL.h" + +int main(int argc, char* argv[]) { if (argc != 2) { diff --git a/Source/Core/DolphinWX/src/SConscript b/Source/Core/DolphinWX/src/SConscript index 4f5dabf0b9..e029e5aaee 100644 --- a/Source/Core/DolphinWX/src/SConscript +++ b/Source/Core/DolphinWX/src/SConscript @@ -18,8 +18,8 @@ files = ["BootManager.cpp", ] -wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", - LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs`") +wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP `sdl-config --cflags`", + LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs` `sdl-config --libs`") if sys.platform == 'darwin': icon = 'Dolphin'