set svn:eol-style=native for **.h

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1438 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
bushing
2008-12-08 04:46:09 +00:00
parent e6fe5ec42f
commit 30c883bcfc
334 changed files with 30407 additions and 30407 deletions

View File

@ -1,92 +1,92 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __ABOUTBOX_h__
#define __ABOUTBOX_h__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/dialog.h>
#else
#include <wx/wxprec.h>
#endif
#include <wx/button.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/statbmp.h>
#undef AboutBox_STYLE
#define AboutBox_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
class AboutBox : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
AboutBox(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("About: nJoy Input Plugin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = AboutBox_STYLE);
virtual ~AboutBox();
void OKClick(wxCommandEvent& event);
private:
wxStaticText *m_thankyoutext;
wxStaticText *m_specialthanks;
wxStaticText *m_pluginversion;
wxButton *m_OK;
wxStaticText *m_version;
wxStaticBox *m_thankyougroup;
wxStaticBox *m_specialthanksgroup;
wxStaticBox *m_pluginversiongroup;
wxStaticBitmap *m_njoylogo;
private:
enum
{
ID_THANKYOU = 1009,
ID_SPECIALTHANKS = 1008,
ID_PLUGINVERSION = 1007,
ID_OK = 1006,
ID_STATUSV = 1005,
IDG_THANKYOU = 1004,
IDG_SPECIALTHANKS = 1003,
IDG_PLUGINVERSION = 1002,
ID_AWESOMEPICTURE = 1001,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
private:
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
};
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __ABOUTBOX_h__
#define __ABOUTBOX_h__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/dialog.h>
#else
#include <wx/wxprec.h>
#endif
#include <wx/button.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/statbmp.h>
#undef AboutBox_STYLE
#define AboutBox_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
class AboutBox : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
AboutBox(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("About: nJoy Input Plugin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = AboutBox_STYLE);
virtual ~AboutBox();
void OKClick(wxCommandEvent& event);
private:
wxStaticText *m_thankyoutext;
wxStaticText *m_specialthanks;
wxStaticText *m_pluginversion;
wxButton *m_OK;
wxStaticText *m_version;
wxStaticBox *m_thankyougroup;
wxStaticBox *m_specialthanksgroup;
wxStaticBox *m_pluginversiongroup;
wxStaticBitmap *m_njoylogo;
private:
enum
{
ID_THANKYOU = 1009,
ID_SPECIALTHANKS = 1008,
ID_PLUGINVERSION = 1007,
ID_OK = 1006,
ID_STATUSV = 1005,
IDG_THANKYOU = 1004,
IDG_SPECIALTHANKS = 1003,
IDG_PLUGINVERSION = 1002,
ID_AWESOMEPICTURE = 1001,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
private:
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
};
#endif

View File

@ -1,242 +1,242 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CONFIGBOX_h__
#define __CONFIGBOX_h__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/dialog.h>
#else
#include <wx/wxprec.h>
#endif
#include <wx/button.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/statbmp.h>
#undef ConfigBox_STYLE
#define ConfigBox_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
class ConfigBox : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
ConfigBox(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Configure: nJoy Input Plugin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = ConfigBox_STYLE);
virtual ~ConfigBox();
private:
wxButton *m_About;
wxButton *m_OK;
wxButton *m_Cancel;
wxPanel *m_Controller[4];
wxNotebook *m_Notebook;
wxComboBox *m_Joyname[4];
wxComboBox *m_Controltype[4];
wxComboBox *m_Deadzone[4];
wxCheckBox *m_Joyattach[4];
wxStaticBox *m_gJoyname[4];
wxStaticBox *m_gExtrasettings[4];
wxStaticBox *m_gControllertype[4];
wxTextCtrl *m_JoyShoulderL[4];
wxTextCtrl *m_JoyShoulderR[4];
wxButton *m_bJoyShoulderL[4];
wxButton *m_bJoyShoulderR[4];
wxTextCtrl *m_JoyButtonA[4];
wxTextCtrl *m_JoyButtonB[4];
wxTextCtrl *m_JoyButtonX[4];
wxTextCtrl *m_JoyButtonY[4];
wxTextCtrl *m_JoyButtonZ[4];
wxTextCtrl *m_JoyButtonStart[4];
wxTextCtrl *m_JoyButtonHalfpress[4];
wxButton *m_bJoyButtonA[4];
wxButton *m_bJoyButtonB[4];
wxButton *m_bJoyButtonX[4];
wxButton *m_bJoyButtonY[4];
wxButton *m_bJoyButtonZ[4];
wxButton *m_bJoyButtonStart[4];
wxButton *m_bJoyButtonCalibrate[4];
wxButton *m_bJoyButtonHalfpress[4];
wxTextCtrl *m_JoyAnalogMainX[4];
wxTextCtrl *m_JoyAnalogMainY[4];
wxTextCtrl *m_JoyAnalogSubX[4];
wxTextCtrl *m_JoyAnalogSubY[4];
wxButton *m_bJoyAnalogMainX[4];
wxButton *m_bJoyAnalogMainY[4];
wxButton *m_bJoyAnalogSubX[4];
wxButton *m_bJoyAnalogSubY[4];
wxTextCtrl *m_JoyDpadUp[4];
wxTextCtrl *m_JoyDpadDown[4];
wxTextCtrl *m_JoyDpadLeft[4];
wxTextCtrl *m_JoyDpadRight[4];
wxButton *m_bJoyDpadUp[4];
wxButton *m_bJoyDpadDown[4];
wxButton *m_bJoyDpadLeft[4];
wxButton *m_bJoyDpadRight[4];
wxStaticText *m_textMainX[4];
wxStaticText *m_textMainY[4];
wxStaticText *m_textDpadUp[4];
wxStaticText *m_textDpadDown[4];
wxStaticText *m_textDpadLeft[4];
wxStaticText *m_textDpadRight[4];
wxStaticText *m_textDeadzone[4];
wxStaticText *m_textHalfpress[4];
wxStaticText *m_textSubX[4];
wxStaticText *m_textSubY[4];
wxStaticText *m_textWebsite[4];
wxTextCtrl *m_PlaceholderBMP[4];
wxStaticBitmap *m_controllerimage[4];
int notebookpage;
private:
enum
{
ID_ABOUT = 1000,
ID_OK,
ID_CANCEL,
ID_NOTEBOOK,
ID_CONTROLLERPAGE1,
ID_CONTROLLERPAGE2,
ID_CONTROLLERPAGE3,
ID_CONTROLLERPAGE4,
IDC_JOYNAME,
IDC_CONTROLTYPE,
IDC_DEADZONE,
IDC_JOYATTACH,
IDG_JOYSTICK,
IDG_EXTRASETTINGS,
IDG_CONTROLLERTYPE,
ID_CONTROLLERPICTURE,
ID_SHOULDER_L = 2000,
ID_SHOULDER_R,
ID_BUTTON_A,
ID_BUTTON_B,
ID_BUTTON_X,
ID_BUTTON_Y,
ID_BUTTON_Z,
ID_BUTTONSTART,
ID_BUTTONHALFPRESS,
ID_ANALOG_MAIN_X,
ID_ANALOG_MAIN_Y,
ID_ANALOG_SUB_X,
ID_ANALOG_SUB_Y,
ID_DPAD_UP,
ID_DPAD_DOWN,
ID_DPAD_LEFT,
ID_DPAD_RIGHT,
IDB_SHOULDER_L = 3000,
IDB_SHOULDER_R,
IDB_BUTTON_A,
IDB_BUTTON_B,
IDB_BUTTON_X,
IDB_BUTTON_Y,
IDB_BUTTON_Z,
IDB_BUTTONSTART,
IDB_BUTTONHALFPRESS,
IDB_ANALOG_MAIN_X,
IDB_ANALOG_MAIN_Y,
IDB_ANALOG_SUB_X,
IDB_ANALOG_SUB_Y,
IDB_DPAD_UP,
IDB_DPAD_DOWN,
IDB_DPAD_LEFT,
IDB_DPAD_RIGHT,
IDT_ANALOG_MAIN_X = 4000,
IDT_ANALOG_MAIN_Y,
IDT_DPAD_UP,
IDT_DPAD_DOWN,
IDT_DPAD_LEFT,
IDT_DPAD_RIGHT,
IDT_DEADZONE,
IDT_BUTTONHALFPRESS,
IDT_ANALOG_SUB_X,
IDT_ANALOG_SUB_Y,
IDT_WEBSITE,
ID_BUTTONCALIBRATE,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
private:
void AboutClick(wxCommandEvent& event);
void OKClick(wxCommandEvent& event);
void CancelClick(wxCommandEvent& event);
void ChangeJoystick(wxCommandEvent& event);
void ChangeControllertype(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
void SetControllerAll(int controller);
void UpdateVisibleItems(int controller);
void GetControllerAll(int controller);
void NotebookPageChanged(wxNotebookEvent& event);
void Calibrate(wxCommandEvent& event);
void GetInputs(wxCommandEvent& event);
void GetHats(int ID);
void SetButtonText(int id, char text[128]);
};
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CONFIGBOX_h__
#define __CONFIGBOX_h__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/dialog.h>
#else
#include <wx/wxprec.h>
#endif
#include <wx/button.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/statbmp.h>
#undef ConfigBox_STYLE
#define ConfigBox_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
class ConfigBox : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
ConfigBox(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Configure: nJoy Input Plugin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = ConfigBox_STYLE);
virtual ~ConfigBox();
private:
wxButton *m_About;
wxButton *m_OK;
wxButton *m_Cancel;
wxPanel *m_Controller[4];
wxNotebook *m_Notebook;
wxComboBox *m_Joyname[4];
wxComboBox *m_Controltype[4];
wxComboBox *m_Deadzone[4];
wxCheckBox *m_Joyattach[4];
wxStaticBox *m_gJoyname[4];
wxStaticBox *m_gExtrasettings[4];
wxStaticBox *m_gControllertype[4];
wxTextCtrl *m_JoyShoulderL[4];
wxTextCtrl *m_JoyShoulderR[4];
wxButton *m_bJoyShoulderL[4];
wxButton *m_bJoyShoulderR[4];
wxTextCtrl *m_JoyButtonA[4];
wxTextCtrl *m_JoyButtonB[4];
wxTextCtrl *m_JoyButtonX[4];
wxTextCtrl *m_JoyButtonY[4];
wxTextCtrl *m_JoyButtonZ[4];
wxTextCtrl *m_JoyButtonStart[4];
wxTextCtrl *m_JoyButtonHalfpress[4];
wxButton *m_bJoyButtonA[4];
wxButton *m_bJoyButtonB[4];
wxButton *m_bJoyButtonX[4];
wxButton *m_bJoyButtonY[4];
wxButton *m_bJoyButtonZ[4];
wxButton *m_bJoyButtonStart[4];
wxButton *m_bJoyButtonCalibrate[4];
wxButton *m_bJoyButtonHalfpress[4];
wxTextCtrl *m_JoyAnalogMainX[4];
wxTextCtrl *m_JoyAnalogMainY[4];
wxTextCtrl *m_JoyAnalogSubX[4];
wxTextCtrl *m_JoyAnalogSubY[4];
wxButton *m_bJoyAnalogMainX[4];
wxButton *m_bJoyAnalogMainY[4];
wxButton *m_bJoyAnalogSubX[4];
wxButton *m_bJoyAnalogSubY[4];
wxTextCtrl *m_JoyDpadUp[4];
wxTextCtrl *m_JoyDpadDown[4];
wxTextCtrl *m_JoyDpadLeft[4];
wxTextCtrl *m_JoyDpadRight[4];
wxButton *m_bJoyDpadUp[4];
wxButton *m_bJoyDpadDown[4];
wxButton *m_bJoyDpadLeft[4];
wxButton *m_bJoyDpadRight[4];
wxStaticText *m_textMainX[4];
wxStaticText *m_textMainY[4];
wxStaticText *m_textDpadUp[4];
wxStaticText *m_textDpadDown[4];
wxStaticText *m_textDpadLeft[4];
wxStaticText *m_textDpadRight[4];
wxStaticText *m_textDeadzone[4];
wxStaticText *m_textHalfpress[4];
wxStaticText *m_textSubX[4];
wxStaticText *m_textSubY[4];
wxStaticText *m_textWebsite[4];
wxTextCtrl *m_PlaceholderBMP[4];
wxStaticBitmap *m_controllerimage[4];
int notebookpage;
private:
enum
{
ID_ABOUT = 1000,
ID_OK,
ID_CANCEL,
ID_NOTEBOOK,
ID_CONTROLLERPAGE1,
ID_CONTROLLERPAGE2,
ID_CONTROLLERPAGE3,
ID_CONTROLLERPAGE4,
IDC_JOYNAME,
IDC_CONTROLTYPE,
IDC_DEADZONE,
IDC_JOYATTACH,
IDG_JOYSTICK,
IDG_EXTRASETTINGS,
IDG_CONTROLLERTYPE,
ID_CONTROLLERPICTURE,
ID_SHOULDER_L = 2000,
ID_SHOULDER_R,
ID_BUTTON_A,
ID_BUTTON_B,
ID_BUTTON_X,
ID_BUTTON_Y,
ID_BUTTON_Z,
ID_BUTTONSTART,
ID_BUTTONHALFPRESS,
ID_ANALOG_MAIN_X,
ID_ANALOG_MAIN_Y,
ID_ANALOG_SUB_X,
ID_ANALOG_SUB_Y,
ID_DPAD_UP,
ID_DPAD_DOWN,
ID_DPAD_LEFT,
ID_DPAD_RIGHT,
IDB_SHOULDER_L = 3000,
IDB_SHOULDER_R,
IDB_BUTTON_A,
IDB_BUTTON_B,
IDB_BUTTON_X,
IDB_BUTTON_Y,
IDB_BUTTON_Z,
IDB_BUTTONSTART,
IDB_BUTTONHALFPRESS,
IDB_ANALOG_MAIN_X,
IDB_ANALOG_MAIN_Y,
IDB_ANALOG_SUB_X,
IDB_ANALOG_SUB_Y,
IDB_DPAD_UP,
IDB_DPAD_DOWN,
IDB_DPAD_LEFT,
IDB_DPAD_RIGHT,
IDT_ANALOG_MAIN_X = 4000,
IDT_ANALOG_MAIN_Y,
IDT_DPAD_UP,
IDT_DPAD_DOWN,
IDT_DPAD_LEFT,
IDT_DPAD_RIGHT,
IDT_DEADZONE,
IDT_BUTTONHALFPRESS,
IDT_ANALOG_SUB_X,
IDT_ANALOG_SUB_Y,
IDT_WEBSITE,
ID_BUTTONCALIBRATE,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
private:
void AboutClick(wxCommandEvent& event);
void OKClick(wxCommandEvent& event);
void CancelClick(wxCommandEvent& event);
void ChangeJoystick(wxCommandEvent& event);
void ChangeControllertype(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
void SetControllerAll(int controller);
void UpdateVisibleItems(int controller);
void GetControllerAll(int controller);
void NotebookPageChanged(wxNotebookEvent& event);
void Calibrate(wxCommandEvent& event);
void GetInputs(wxCommandEvent& event);
void GetHats(int ID);
void SetButtonText(int id, char text[128]);
};
#endif

View File

@ -1,183 +1,183 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
// Set this if you want to use the rumble 'hack' for controller one
//#define USE_RUMBLE_DINPUT_HACK
#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS
#define DIRECTINPUT_VERSION 0x0800
#define WIN32_LEAN_AND_MEAN
#include <tchar.h>
#include <math.h>
#ifdef USE_RUMBLE_DINPUT_HACK
#include <dinput.h> // used for rumble
#endif
#endif
#include <vector>
#include <stdio.h>
#include <time.h>
#include <SDL.h>
#ifdef _WIN32
#define SLEEP(x) Sleep(x)
#else
#include <unistd.h>
#include <sys/ioctl.h>
#define SLEEP(x) usleep(x*1000)
#endif
#ifdef __linux__
#include <linux/input.h>
#endif
#include "GUI/AboutBox.h"
#include "GUI/ConfigBox.h"
#include "Common.h"
#include "pluginspecs_pad.h"
#include "IniFile.h"
#ifdef _WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "comctl32.lib")
// Required for the rumble part
#ifdef USE_RUMBLE_DINPUT_HACK
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "winmm.lib")
#endif
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Define
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define INPUT_VERSION "0.4"
#define INPUT_STATE "TESTING"
#define RELDAY "01"
#define RELMONTH "12"
#define RELYEAR "2008"
#define THANKYOU "`plot`, Absolute0, Aprentice, Bositman, Brice, ChaosCode, CKemu, CoDeX, Dave2001, dn, drk||Raziel, Florin, Gent, Gigaherz, Hacktarux, JegHegy, Linker, Linuzappz, Martin64, Muad, Knuckles, Raziel, Refraction, Rudy_x, Shadowprince, Snake785, Saqib, vEX, yaz0r, Zilmar, Zenogais and ZeZu."
//////////////////////////////////////////////////////////////////////////////////////////
// Structures
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAX_AXISES 12 // If more than 12 is needed. Up it
class sCalibration
{
public:
sCalibration()
{
Min = 0;
Max = 0;
}
Sint16 Min;
Sint16 Max;
}; // Simple Calibration Data
struct CONTROLLER_STATE{ // GC PAD INFO/STATE
int buttons[12]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int halfpress; // ...
SDL_Joystick *joy; // SDL joystick device
};
struct CONTROLLER_MAPPING{ // GC PAD MAPPING
std::string buttons[12];// Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
sCalibration sData[MAX_AXISES]; // Calibration Data
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int enabled; // Pad attached?
int deadzone; // Deadzone... what else?
int halfpress; // Halfpress... you know, like not fully pressed ;)...
int ID; // SDL joystick device ID
int controllertype; // Joystick, Joystick no hat or a keyboard (perhaps a mouse later)
int eventnum; // Linux Event Number, Can't be found dynamically yet
};
struct CONTROLLER_INFO{ // CONNECTED WINDOWS DEVICES INFO
int NumAxes; // Amount of Axes
int NumButtons; // Amount of Buttons
int NumBalls; // Amount of Balls
int NumHats; // Amount of Hats (POV)
const char *Name; // Joypad/stickname
int ID; // SDL joystick device ID
SDL_Joystick *joy; // SDL joystick device
};
enum
{
CTL_L_SHOULDER = 0,
CTL_R_SHOULDER,
CTL_A_BUTTON,
CTL_B_BUTTON,
CTL_X_BUTTON,
CTL_Y_BUTTON,
CTL_Z_TRIGGER,
CTL_START,
CTL_MAIN_X,
CTL_MAIN_Y,
CTL_SUB_X,
CTL_SUB_Y,
CTRL_END,
};
enum
{
CTL_TYPE_JOYSTICK = 0,
CTL_TYPE_JOYSTICK_NO_HAT,
CTL_TYPE_JOYSTICK_XBOX360,
CTL_TYPE_KEYBOARD
};
enum
{
CTL_D_PAD_UP = 0,
CTL_D_PAD_DOWN,
CTL_D_PAD_LEFT,
CTL_D_PAD_RIGHT
};
//////////////////////////////////////////////////////////////////////////////////////////
// Custom Functions
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void GetJoyState(int controller);
int Search_Devices();
void DEBUG_INIT();
void DEBUG_QUIT();
void SaveConfig();
void LoadConfig();
//////////////////////////////////////////////////////////////////////////////////////////
// Project description
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Name: nJoy
// Description: A Dolphin Compatible Input Plugin
//
// Author: Falcon4ever (nJoy@falcon4ever.com)
// Site: www.multigesture.net
// Copyright (C) 2003-2008 Dolphin Project.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Licensetype: GNU General Public License (GPL)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
//
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
//
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
//
//////////////////////////////////////////////////////////////////////////////////////////
// Set this if you want to use the rumble 'hack' for controller one
//#define USE_RUMBLE_DINPUT_HACK
#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS
#define DIRECTINPUT_VERSION 0x0800
#define WIN32_LEAN_AND_MEAN
#include <tchar.h>
#include <math.h>
#ifdef USE_RUMBLE_DINPUT_HACK
#include <dinput.h> // used for rumble
#endif
#endif
#include <vector>
#include <stdio.h>
#include <time.h>
#include <SDL.h>
#ifdef _WIN32
#define SLEEP(x) Sleep(x)
#else
#include <unistd.h>
#include <sys/ioctl.h>
#define SLEEP(x) usleep(x*1000)
#endif
#ifdef __linux__
#include <linux/input.h>
#endif
#include "GUI/AboutBox.h"
#include "GUI/ConfigBox.h"
#include "Common.h"
#include "pluginspecs_pad.h"
#include "IniFile.h"
#ifdef _WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "comctl32.lib")
// Required for the rumble part
#ifdef USE_RUMBLE_DINPUT_HACK
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "winmm.lib")
#endif
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Define
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define INPUT_VERSION "0.4"
#define INPUT_STATE "TESTING"
#define RELDAY "01"
#define RELMONTH "12"
#define RELYEAR "2008"
#define THANKYOU "`plot`, Absolute0, Aprentice, Bositman, Brice, ChaosCode, CKemu, CoDeX, Dave2001, dn, drk||Raziel, Florin, Gent, Gigaherz, Hacktarux, JegHegy, Linker, Linuzappz, Martin64, Muad, Knuckles, Raziel, Refraction, Rudy_x, Shadowprince, Snake785, Saqib, vEX, yaz0r, Zilmar, Zenogais and ZeZu."
//////////////////////////////////////////////////////////////////////////////////////////
// Structures
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAX_AXISES 12 // If more than 12 is needed. Up it
class sCalibration
{
public:
sCalibration()
{
Min = 0;
Max = 0;
}
Sint16 Min;
Sint16 Max;
}; // Simple Calibration Data
struct CONTROLLER_STATE{ // GC PAD INFO/STATE
int buttons[12]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int halfpress; // ...
SDL_Joystick *joy; // SDL joystick device
};
struct CONTROLLER_MAPPING{ // GC PAD MAPPING
std::string buttons[12];// Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
sCalibration sData[MAX_AXISES]; // Calibration Data
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int enabled; // Pad attached?
int deadzone; // Deadzone... what else?
int halfpress; // Halfpress... you know, like not fully pressed ;)...
int ID; // SDL joystick device ID
int controllertype; // Joystick, Joystick no hat or a keyboard (perhaps a mouse later)
int eventnum; // Linux Event Number, Can't be found dynamically yet
};
struct CONTROLLER_INFO{ // CONNECTED WINDOWS DEVICES INFO
int NumAxes; // Amount of Axes
int NumButtons; // Amount of Buttons
int NumBalls; // Amount of Balls
int NumHats; // Amount of Hats (POV)
const char *Name; // Joypad/stickname
int ID; // SDL joystick device ID
SDL_Joystick *joy; // SDL joystick device
};
enum
{
CTL_L_SHOULDER = 0,
CTL_R_SHOULDER,
CTL_A_BUTTON,
CTL_B_BUTTON,
CTL_X_BUTTON,
CTL_Y_BUTTON,
CTL_Z_TRIGGER,
CTL_START,
CTL_MAIN_X,
CTL_MAIN_Y,
CTL_SUB_X,
CTL_SUB_Y,
CTRL_END,
};
enum
{
CTL_TYPE_JOYSTICK = 0,
CTL_TYPE_JOYSTICK_NO_HAT,
CTL_TYPE_JOYSTICK_XBOX360,
CTL_TYPE_KEYBOARD
};
enum
{
CTL_D_PAD_UP = 0,
CTL_D_PAD_DOWN,
CTL_D_PAD_LEFT,
CTL_D_PAD_RIGHT
};
//////////////////////////////////////////////////////////////////////////////////////////
// Custom Functions
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void GetJoyState(int controller);
int Search_Devices();
void DEBUG_INIT();
void DEBUG_QUIT();
void SaveConfig();
void LoadConfig();