diff --git a/Binary/linux/nJoy.ini b/Binary/linux/nJoy.ini new file mode 100644 index 0000000000..8133a2c702 --- /dev/null +++ b/Binary/linux/nJoy.ini @@ -0,0 +1,92 @@ +[PAD1] +l_shoulder = 4 +r_shoulder = 5 +a_button = 0 +b_button = 1 +x_button = 3 +y_button = 2 +z_trigger = 7 +start_button = 9 +dpad = 0 +dpad_up = 0 +dpad_down = 0 +dpad_left = 0 +dpad_right = 0 +main_x = 0 +main_y = 1 +sub_x = 2 +sub_y = 3 +enabled = 1 +deadzone = 9 +halfpress = 6 +joy_id = 0 +controllertype = 0 +[PAD2] +l_shoulder = 4 +r_shoulder = 5 +a_button = 0 +b_button = 1 +x_button = 3 +y_button = 2 +z_trigger = 7 +start_button = 9 +dpad = 0 +dpad_up = 0 +dpad_down = 0 +dpad_left = 0 +dpad_right = 0 +main_x = 0 +main_y = 1 +sub_x = 2 +sub_y = 3 +enabled = 0 +deadzone = 9 +halfpress = 6 +joy_id = 0 +controllertype = 0 +[PAD3] +l_shoulder = 4 +r_shoulder = 5 +a_button = 0 +b_button = 1 +x_button = 3 +y_button = 2 +z_trigger = 7 +start_button = 9 +dpad = 0 +dpad_up = 0 +dpad_down = 0 +dpad_left = 0 +dpad_right = 0 +main_x = 0 +main_y = 1 +sub_x = 2 +sub_y = 3 +enabled = 0 +deadzone = 9 +halfpress = 6 +joy_id = 0 +controllertype = 0 +[PAD4] +l_shoulder = 4 +r_shoulder = 5 +a_button = 0 +b_button = 1 +x_button = 3 +y_button = 2 +z_trigger = 7 +start_button = 9 +dpad = 0 +dpad_up = 0 +dpad_down = 0 +dpad_left = 0 +dpad_right = 0 +main_x = 0 +main_y = 1 +sub_x = 2 +sub_y = 3 +enabled = 0 +deadzone = 9 +halfpress = 6 +joy_id = 0 +controllertype = 0 diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp index 6583a1a707..a678a5fbe1 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/config.cpp @@ -28,9 +28,9 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// - -// whole file... until we fix the GUI -#ifdef _WIN32 + +// whole file... until we fix the GUI +#ifdef _WIN32 #include "nJoy.h" @@ -616,4 +616,4 @@ BOOL CALLBACK AboutDlg(HWND abouthWnd, UINT message, WPARAM wParam, LPARAM lPara return FALSE; } -#endif +#endif diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/config.h b/Source/Plugins/Plugin_nJoy_SDL/Src/config.h index f3e9f6130e..2462e25a68 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/config.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/config.h @@ -28,10 +28,10 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// - -// whole file... until we fix the GUI + +// whole file... until we fix the GUI #ifdef _WIN32 - + #include // includes basic windows functionality #include #include @@ -69,6 +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 f37086b100..331db1be69 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -44,7 +44,7 @@ bool emulator_running = FALSE; ////////////////////////////////////////////////////////////////////////////////////////// // DllMain -// ŻŻŻŻŻŻŻ +// ŻŻŻŻŻŻŻ #ifdef _WIN32 BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle DWORD dwReason, // reason called @@ -55,7 +55,7 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle nJoy_hInst = hinstDLL; return TRUE; } -#endif +#endif ////////////////////////////////////////////////////////////////////////////////////////// // Input Plugin Functions (from spec's) @@ -78,16 +78,16 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo) // Call about dialog // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void DllAbout(HWND _hParent) -{ +{ #ifdef _WIN32 - OpenAbout(nJoy_hInst, _hParent); + OpenAbout(nJoy_hInst, _hParent); #endif } // Call config dialog // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void DllConfig(HWND _hParent) -{ +{ #ifdef _WIN32 if(SDL_Init(SDL_INIT_JOYSTICK ) < 0) { @@ -100,7 +100,7 @@ void DllConfig(HWND _hParent) { SaveConfig(); } - LoadConfig(); // reload settings + LoadConfig(); // reload settings #endif } @@ -114,11 +114,11 @@ void PAD_Initialize(SPADInitialize _PADInitialize) #endif if(SDL_Init(SDL_INIT_JOYSTICK ) < 0) - { + { #ifdef _WIN32 - MessageBox(NULL, SDL_GetError(), "Could not initialize SDL!", MB_ICONERROR); - #else - printf("Could not initialize SDL! (%s)\n", SDL_GetError()); + MessageBox(NULL, SDL_GetError(), "Could not initialize SDL!", MB_ICONERROR); + #else + printf("Could not initialize SDL! (%s)\n", SDL_GetError()); #endif return; } @@ -356,11 +356,11 @@ int Search_Devices() int numjoy = SDL_NumJoysticks(); if(numjoy == 0) - { + { #ifdef _WIN32 - MessageBox(NULL, "No Joystick detected!", NULL, MB_ICONWARNING); - #else - printf("No Joystick detected!\n"); + MessageBox(NULL, "No Joystick detected!", NULL, MB_ICONWARNING); + #else + printf("No Joystick detected!\n"); #endif return 0; } @@ -413,18 +413,18 @@ void DEBUG_INIT() { if(pFile) return; - + #ifdef _WIN32 - char dateStr [9]; + char dateStr [9]; _strdate( dateStr); - char timeStr [9]; + char timeStr [9]; _strtime( timeStr ); - #endif + #endif pFile = fopen ("nJoy-debug.txt","wt"); - fprintf(pFile, "nJoy v"INPUT_VERSION" Debug\n"); + fprintf(pFile, "nJoy v"INPUT_VERSION" Debug\n"); #ifdef _WIN32 - fprintf(pFile, "Date: %s\nTime: %s\n", dateStr, timeStr); + fprintf(pFile, "Date: %s\nTime: %s\n", dateStr, timeStr); #endif fprintf(pFile, "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n"); } @@ -435,13 +435,13 @@ 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 a92fd3cc12..304dc98ee6 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h @@ -28,25 +28,25 @@ // http://code.google.com/p/dolphin-emu/ // ////////////////////////////////////////////////////////////////////////////////////////// - + #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN -#include -#endif +#include +#endif #include #include -#include +#include #include // includes SDL - -#include "Common.h" // only linux? + +#include "Common.h" #include "pluginspecs_pad.h" #include "config.h" #include "IniFile.h" - + #ifdef _WIN32 #pragma comment(lib, "SDL.lib") #endif @@ -137,4 +137,4 @@ void DEBUG_INIT(); void DEBUG_QUIT(); void SaveConfig(); -void LoadConfig(); +void LoadConfig();