diff --git a/SConstruct b/SConstruct index f10463abb7..1d9048e876 100644 --- a/SConstruct +++ b/SConstruct @@ -26,7 +26,7 @@ dirs = ["Source/Core/Common/Src", "Source/Plugins/Plugin_DSP_NULL/Src", "Source/Plugins/Plugin_DSP_LLE/Src", "Source/Plugins/Plugin_PadSimple/Src", - "Source/Plugins/Plugin_nJoy_SDL/Plugin_nJoy_SDL", + "Source/Plugins/Plugin_nJoy_SDL/Src", "Source/Core/DolphinWX/src", ] diff --git a/Source/Core/DebuggerWX/src/SConscript b/Source/Core/DebuggerWX/src/SConscript index 4615a805ed..b9955a3270 100644 --- a/Source/Core/DebuggerWX/src/SConscript +++ b/Source/Core/DebuggerWX/src/SConscript @@ -14,7 +14,7 @@ files = ["LogWindow.cpp", "RegisterWindow.cpp", "RegisterView.cpp", ] -wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags --debug` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", +wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs --debug`") wxenv.StaticLibrary("debwx", files, LIBS = ["common"]) diff --git a/Source/Core/DolphinWX/src/SConscript b/Source/Core/DolphinWX/src/SConscript index e4235f19a8..0589eee1c7 100644 --- a/Source/Core/DolphinWX/src/SConscript +++ b/Source/Core/DolphinWX/src/SConscript @@ -13,7 +13,7 @@ files = ["BootManager.cpp", "PluginOptions.cpp", "stdafx.cpp", ] -wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags --debug` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", - LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs --debug`") +wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", + LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs`") wxenv.Program("../../../../Binary/linux/Dolphin", files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common"]) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 2ed5d13a33..066e1cf542 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -24,6 +24,6 @@ files = ["BPStructs.cpp", "GUI/ConfigDlg.cpp", ] -gfxenv=env.Copy(CXXFLAGS = " `wx-config --cppflags --debug` `pkg-config --cflags xxf86vm` ", LINKFLAGS = "`wx-config --libs --debug` `pkg-config --libs xxf86vm` ") +gfxenv=env.Copy(CXXFLAGS = " `wx-config --cppflags` `pkg-config --cflags xxf86vm` ", LINKFLAGS = "`wx-config --libs` `pkg-config --libs xxf86vm` ") gfxenv.SharedLibrary("../../../../Binary/linux/Plugins/zeroogl.so", files, LIBS=["videocommon", "common", "cairo", "GL", "GLEW", "CgGL", "Cg", "X11"]) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript new file mode 100644 index 0000000000..eca5bc0ffd --- /dev/null +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript @@ -0,0 +1,6 @@ +Import('env') +output = "../../../../Binary/linux/Plugins/Plugin_nJoy_SDL.so" +files = ["nJoy.cpp" + ] +padenv=env.Copy(CXXFLAGS = " `pkg-config --cflags sdl`", LINKFLAGS = " `pkg-config --libs sdl`") +padenv.SharedLibrary(output, files, LIBS=["common"]) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp index 75c2af1b9d..6583a1a707 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp @@ -28,6 +28,9 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// + +// whole file... until we fix the GUI +#ifdef _WIN32 #include "nJoy.h" @@ -613,3 +616,4 @@ BOOL CALLBACK AboutDlg(HWND abouthWnd, UINT message, WPARAM wParam, LPARAM lPara return FALSE; } +#endif diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/config.h b/Source/Plugins/Plugin_nJoy_SDL/Src/config.h index 0b6e8debc5..f3e9f6130e 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/config.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/config.h @@ -28,7 +28,10 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// - + +// whole file... until we fix the GUI +#ifdef _WIN32 + #include // includes basic windows functionality #include #include @@ -66,4 +69,6 @@ void SetButton(HWND hDlg, int item, int value); // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void OpenAbout(HINSTANCE hInst, HWND _hParent); -BOOL CALLBACK AboutDlg(HWND abouthWnd, UINT message, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK AboutDlg(HWND abouthWnd, UINT message, WPARAM wParam, LPARAM lParam); + +#endif diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp index a024bd6257..f37086b100 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -44,7 +44,8 @@ bool emulator_running = FALSE; ////////////////////////////////////////////////////////////////////////////////////////// // DllMain -// ŻŻŻŻŻŻŻ +// ŻŻŻŻŻŻŻ +#ifdef _WIN32 BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle DWORD dwReason, // reason called LPVOID lpvReserved) // reserved @@ -54,6 +55,7 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle nJoy_hInst = hinstDLL; return TRUE; } +#endif ////////////////////////////////////////////////////////////////////////////////////////// // Input Plugin Functions (from spec's) @@ -76,14 +78,17 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo) // Call about dialog // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void DllAbout(HWND _hParent) -{ - OpenAbout(nJoy_hInst, _hParent); +{ + #ifdef _WIN32 + OpenAbout(nJoy_hInst, _hParent); + #endif } // Call config dialog // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void DllConfig(HWND _hParent) -{ +{ + #ifdef _WIN32 if(SDL_Init(SDL_INIT_JOYSTICK ) < 0) { MessageBox(NULL, SDL_GetError(), "Could not initialize SDL!", MB_ICONERROR); @@ -95,7 +100,8 @@ void DllConfig(HWND _hParent) { SaveConfig(); } - LoadConfig(); // reload settings + LoadConfig(); // reload settings + #endif } // Init PAD (start emulation) @@ -108,8 +114,12 @@ void PAD_Initialize(SPADInitialize _PADInitialize) #endif if(SDL_Init(SDL_INIT_JOYSTICK ) < 0) - { - MessageBox(NULL, SDL_GetError(), "Could not initialize SDL!", MB_ICONERROR); + { + #ifdef _WIN32 + MessageBox(NULL, SDL_GetError(), "Could not initialize SDL!", MB_ICONERROR); + #else + printf("Could not initialize SDL! (%s)\n", SDL_GetError()); + #endif return; } @@ -346,8 +356,12 @@ int Search_Devices() int numjoy = SDL_NumJoysticks(); if(numjoy == 0) - { - MessageBox(NULL, "No Joystick detected!", NULL, MB_ICONWARNING); + { + #ifdef _WIN32 + MessageBox(NULL, "No Joystick detected!", NULL, MB_ICONWARNING); + #else + printf("No Joystick detected!\n"); + #endif return 0; } @@ -399,15 +413,19 @@ void DEBUG_INIT() { if(pFile) return; - - char dateStr [9]; + + #ifdef _WIN32 + char dateStr [9]; _strdate( dateStr); - char timeStr [9]; + char timeStr [9]; _strtime( timeStr ); + #endif pFile = fopen ("nJoy-debug.txt","wt"); - fprintf(pFile, "nJoy v"INPUT_VERSION" Debug\n"); - fprintf(pFile, "Date: %s\nTime: %s\n", dateStr, timeStr); + fprintf(pFile, "nJoy v"INPUT_VERSION" Debug\n"); + #ifdef _WIN32 + fprintf(pFile, "Date: %s\nTime: %s\n", dateStr, timeStr); + #endif fprintf(pFile, "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n"); } @@ -417,12 +435,14 @@ void DEBUG_QUIT() { if(!pFile) return; - + + #ifdef _WIN32 char timeStr [9]; _strtime(timeStr); fprintf(pFile, "_______________\n"); - fprintf(pFile, "Time: %s", timeStr); + fprintf(pFile, "Time: %s", timeStr); + #endif fclose(pFile); } diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h index 189ff55623..a92fd3cc12 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h @@ -28,22 +28,28 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// - + +#ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN -#include +#include +#endif + #include #include -#include +#include #include // includes SDL + +#include "Common.h" // only linux? #include "pluginspecs_pad.h" #include "config.h" #include "IniFile.h" - + +#ifdef _WIN32 #pragma comment(lib, "SDL.lib") -// #pragma comment(lib, "SDLmain.lib") +#endif ////////////////////////////////////////////////////////////////////////////////////////// // Define @@ -131,4 +137,4 @@ void DEBUG_INIT(); void DEBUG_QUIT(); void SaveConfig(); -void LoadConfig(); \ No newline at end of file +void LoadConfig();