mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
removed old njoy structure
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@52 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
+4
-1
@@ -81,7 +81,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoCommon", "Core\VideoCo
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_PadDX9", "Plugins\Plugin_PadDX9\Plugin_PadDX9.vcproj", "{805B34AA-82A5-4875-8DC7-3C85BDC0BCEE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_nJoy_SDL", "Plugins\Plugin_nJoy_SDL\Plugin_nJoy_SDL\Plugin_nJoy_SDL.vcproj", "{521498BE-6089-4780-8223-E67C22F4E068}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_nJoy_SDL", "Plugins\Plugin_nJoy_SDL\Plugin_nJoy_SDL.vcproj", "{521498BE-6089-4780-8223-E67C22F4E068}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// 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/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// M O D U L E B E G I N ///////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nJoy.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// I M P L E M E N T A T I O N //////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// constructor
|
||||
//
|
||||
IniFile::IniFile(void)
|
||||
{
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// destructor
|
||||
//
|
||||
IniFile::~IniFile(void)
|
||||
{
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// SetFile
|
||||
//
|
||||
void
|
||||
IniFile::SetFile(const TCHAR* _filename)
|
||||
{
|
||||
if (_filename)
|
||||
{
|
||||
char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR];
|
||||
char fname[_MAX_FNAME],ext[_MAX_EXT];
|
||||
|
||||
GetModuleFileName(NULL,path_buffer,sizeof(path_buffer));
|
||||
_splitpath( path_buffer, drive, dir, fname, ext );
|
||||
_makepath( filename, drive, dir, _filename, ".ini");
|
||||
}
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// SetSection
|
||||
//
|
||||
void
|
||||
IniFile::SetSection(const TCHAR *_section)
|
||||
{
|
||||
_tcscpy(section,_section);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// ReadInt
|
||||
//
|
||||
int
|
||||
IniFile::ReadInt(const TCHAR *key, int def)
|
||||
{
|
||||
return GetPrivateProfileInt(section, key, def, filename);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// WriteInt
|
||||
//
|
||||
void
|
||||
IniFile::WriteInt(const TCHAR *key, int value)
|
||||
{
|
||||
char temp[256];
|
||||
WritePrivateProfileString(section, key, _itoa(value,temp,10), filename);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// ReadBool
|
||||
//
|
||||
bool
|
||||
IniFile::ReadBool(const TCHAR *key, bool def)
|
||||
{
|
||||
return ReadInt(key,def?1:0) == 0 ? false : true;
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// WriteBool
|
||||
//
|
||||
void
|
||||
IniFile::WriteBool(const TCHAR *key, bool value)
|
||||
{
|
||||
WriteInt(key,value?1:0);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// ReadString
|
||||
//
|
||||
void
|
||||
IniFile::ReadString(const TCHAR *key, const TCHAR *def, TCHAR *out, int size)
|
||||
{
|
||||
GetPrivateProfileString(section, key, def, out, size, filename);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// WriteString
|
||||
//
|
||||
void
|
||||
IniFile::WriteString(const TCHAR *key, const TCHAR *value)
|
||||
{
|
||||
WritePrivateProfileString(section, key, value, filename);
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// ReadStringList
|
||||
//
|
||||
void
|
||||
IniFile::ReadStringList(const TCHAR *key, std::vector<std::string> &list)
|
||||
{
|
||||
int count = ReadInt(key);
|
||||
for (int i=0; i<count; i++)
|
||||
{
|
||||
char temp[256], temp2[256];
|
||||
sprintf(temp,"%s%i",key,i);
|
||||
ReadString(temp,"",temp2,256);
|
||||
list.push_back(std::string(temp2));
|
||||
}
|
||||
}
|
||||
|
||||
// ________________________________________________________________________________________ __________
|
||||
// WriteStringList
|
||||
//
|
||||
void
|
||||
IniFile::WriteStringList(const TCHAR *key, std::vector<std::string> &list)
|
||||
{
|
||||
WriteInt(key,(int)list.size());
|
||||
int i=0;
|
||||
for (std::vector<std::string>::iterator iter = list.begin(); iter!=list.end(); iter++)
|
||||
{
|
||||
char temp[256];
|
||||
sprintf(temp,"%s%i",key,i);
|
||||
WriteString(temp,iter->c_str());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// 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/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// M O D U L E B E G I N ///////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// C L A S S ////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class IniFile
|
||||
{
|
||||
public:
|
||||
IniFile(void);
|
||||
~IniFile(void);
|
||||
|
||||
void SetFile(const TCHAR *fname);
|
||||
void SetSection(const TCHAR *section);
|
||||
|
||||
int ReadInt (const TCHAR *key, int def = 0);
|
||||
void WriteInt (const TCHAR *key, int value);
|
||||
bool ReadBool (const TCHAR *key, bool def = false);
|
||||
void WriteBool (const TCHAR *key, bool value);
|
||||
void ReadString (const TCHAR *key, const TCHAR *def, TCHAR *out, int size = 255);
|
||||
void WriteString(const TCHAR *key, const TCHAR *value);
|
||||
void ReadStringList (const TCHAR *key, std::vector<std::string> &list);
|
||||
void WriteStringList(const TCHAR *key, std::vector<std::string> &list);
|
||||
|
||||
private:
|
||||
TCHAR filename[512];
|
||||
TCHAR section[256];
|
||||
};
|
||||
@@ -1,158 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Dutch (Netherlands) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_DUTCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 411, 282
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
COMBOBOX IDC_JOYNAME,8,18,317,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Controller:",IDC_STATIC,3,7,405,28
|
||||
CONTROL 102,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE | SS_SUNKEN,65,46,281,187
|
||||
CONTROL "Controller attached",IDC_JOYATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,330,19,73,10
|
||||
PUSHBUTTON "",IDC_SHOULDERL,46,50,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_B,350,50,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_SHOULDERR,350,66,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_Z,350,90,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_Y,350,106,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_X,350,150,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_A,350,173,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_SX,351,217,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_START,197,236,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_DPAD,46,183,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_MX,46,135,15,10,0,WS_EX_STATICEDGE
|
||||
CTEXT "",IDTEXT_SHOULDERL,4,49,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_B,368,49,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_SHOULDERR,368,65,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_Z,368,89,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_Y,368,105,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_X,368,149,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_A,368,172,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_MX,4,134,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_DPAD,4,182,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_START,185,248,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_MY,3,157,40,12,WS_BORDER
|
||||
LTEXT "X-axis",IDC_STATIC,4,124,20,8
|
||||
LTEXT "Y-axis",IDC_STATIC,4,147,20,8
|
||||
CTEXT "",IDTEXT_SX,368,216,40,12,WS_BORDER
|
||||
CTEXT "",IDTEXT_SY,367,239,40,12,WS_BORDER
|
||||
LTEXT "X-axis",IDC_STATIC,368,206,20,8
|
||||
LTEXT "Y-axis",IDC_STATIC,368,229,20,8
|
||||
PUSHBUTTON "",IDC_SY,351,240,15,10,0,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "",IDC_MY,46,158,15,10,0,WS_EX_STATICEDGE
|
||||
GROUPBOX "Extra settings",IDC_STATIC,3,236,95,43
|
||||
LTEXT "Deadzone",IDC_STATIC,11,248,33,8
|
||||
LTEXT "Half press",IDC_STATIC,11,263,33,8
|
||||
COMBOBOX IDC_DEADZONE,45,246,48,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_HALFPRESS,45,261,48,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "www.multigesture.net",IDC_STATIC,336,271,72,8
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 133, 227
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
|
||||
CAPTION "About: nJoy Input Plugin"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,75,209,50,14
|
||||
CONTROL 104,IDC_STATIC,"Static",SS_BITMAP,0,0,133,37
|
||||
GROUPBOX "Plugin info:",IDC_STATIC,7,39,120,42
|
||||
GROUPBOX "Special thanks to:",IDC_STATIC,7,84,120,24
|
||||
GROUPBOX "Greetings to:",IDC_STATIC,7,112,120,95
|
||||
LTEXT "",IDC_ABOUT_TEXT,13,51,108,24
|
||||
LTEXT "F|RES and ector.",IDC_STATIC,13,95,108,8
|
||||
LTEXT "Static",IDC_ABOUT_TEXT2,13,123,111,82
|
||||
LTEXT "BETA RELEASE",IDC_ABOUT_TEXT3,10,211,62,13
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 3
|
||||
RIGHTMARGIN, 408
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 279
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP1 BITMAP "images\\controller.bmp"
|
||||
IDB_BITMAP2 BITMAP "images\\njoy.bmp"
|
||||
#endif // Dutch (Netherlands) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Project description
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
// 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/
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <windows.h> // includes basic windows functionality
|
||||
#include <Windowsx.h>
|
||||
#include <stdio.h>
|
||||
#include <commctrl.h> // includes the common control header
|
||||
|
||||
#include "resource.h" // includes GUI IDs
|
||||
|
||||
#pragma comment(lib, "comctl32.lib")
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Config dialog functions
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
int OpenConfig(HINSTANCE hInst, HWND _hParent);
|
||||
BOOL ControllerTab(HWND hDlg, UINT message, UINT wParam, LONG lParam, int controller);
|
||||
BOOL APIENTRY ControllerTab1(HWND hDlg, UINT message, UINT wParam, LONG lParam);
|
||||
BOOL APIENTRY ControllerTab2(HWND hDlg, UINT message, UINT wParam, LONG lParam);
|
||||
BOOL APIENTRY ControllerTab3(HWND hDlg, UINT message, UINT wParam, LONG lParam);
|
||||
BOOL APIENTRY ControllerTab4(HWND hDlg, UINT message, UINT wParam, LONG lParam);
|
||||
|
||||
bool GetButtons(HWND hDlg, int buttonid, int controller);
|
||||
bool GetHats(HWND hDlg, int buttonid, int controller);
|
||||
bool GetAxis(HWND hDlg, int buttonid, int controller);
|
||||
|
||||
void GetControllerAll(HWND hDlg, int controller);
|
||||
void SetControllerAll(HWND hDlg, int controller);
|
||||
|
||||
int GetButton(HWND hDlg, int item);
|
||||
void SetButton(HWND hDlg, int item, int value);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// About dialog functions
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
void OpenAbout(HINSTANCE hInst, HWND _hParent);
|
||||
BOOL CALLBACK AboutDlg(HWND abouthWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 375 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
File diff suppressed because it is too large
Load Diff
@@ -1,116 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Project description
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
// 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/
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <tchar.h>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <SDL.h> // includes SDL
|
||||
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "config.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#pragma comment(lib, "SDL.lib")
|
||||
// #pragma comment(lib, "SDLmain.lib")
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Define
|
||||
// ¯¯¯¯¯¯
|
||||
|
||||
#define INPUT_VERSION "0.3"
|
||||
#define INPUT_STATE "PUBLIC RELEASE"
|
||||
#define RELDAY "21"
|
||||
#define RELMONTH "07"
|
||||
#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."
|
||||
|
||||
struct CONTROLLER_STATE{ // GC PAD INFO/STATE
|
||||
int buttons[8]; // 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 axis[4]; // 2 x 2 Axes (Main & Sub)
|
||||
SDL_Joystick *joy; // SDL joystick device
|
||||
};
|
||||
|
||||
struct CONTROLLER_MAPPING{ // GC PAD MAPPING
|
||||
int buttons[8]; // 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 axis[4]; // 2 x 2 Axes (Main & Sub)
|
||||
int enabled; // Pad attached?
|
||||
int deadzone; // Deadzone... what else?
|
||||
int halfpress; // Not implemented
|
||||
int ID; // SDL joystick device ID
|
||||
};
|
||||
|
||||
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_MAIN_X = 0,
|
||||
CTL_MAIN_Y,
|
||||
CTL_SUB_X,
|
||||
CTL_SUB_Y,
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Custom Functions
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
void GetJoyState(int controller);
|
||||
int Search_Devices();
|
||||
void DEBUG_INIT();
|
||||
void DEBUG_QUIT();
|
||||
|
||||
void SaveConfig();
|
||||
void LoadConfig();
|
||||
@@ -1,115 +0,0 @@
|
||||
nJoy v0.3 by Falcon4ever 2008
|
||||
A Dolphin Compatible Input Plugin
|
||||
Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
Changelog
|
||||
==========================================================================
|
||||
|
||||
0.3: 3nd version of nJoy
|
||||
- Release: July 2008
|
||||
- Support for four players
|
||||
- Misc. improvements
|
||||
|
||||
0.2: 2nd version of nJoy
|
||||
- Release: 14th July 2005
|
||||
- Now using SDL instead of DirectInput9
|
||||
- Config/INI support
|
||||
- Adjustable deadzone
|
||||
- First public release
|
||||
|
||||
0.1: First version of nJoy
|
||||
- Private Release: january 2005
|
||||
- Using DirectInput9
|
||||
- Specially made for the Logitech Rumblepad 2, but other joypads work too
|
||||
- Advanced debug window, activated during gameplay
|
||||
- No deadzone configurable
|
||||
- No config/Ini
|
||||
|
||||
The Author
|
||||
==========================================================================
|
||||
* Falcon4ever (nJoy@falcon4ever.com)
|
||||
|
||||
System and Software Requirements
|
||||
==========================================================================
|
||||
Dolphin
|
||||
The latest Dolphin release, avaible at www.dolphin-emu.com
|
||||
|
||||
SDL.dll (SDL-1.2.13)
|
||||
(included with this release)
|
||||
latest version avaible at www.libsdl.org
|
||||
|
||||
A Joystick
|
||||
A Windows 9x compatible input device
|
||||
|
||||
|
||||
Plugin Information
|
||||
==========================================================================
|
||||
nJoy was written in C++, compiled with Microsoft Visual Studio 2005 Professional Edition.
|
||||
nJoy uses SDL for joysticks, mouse and keyboard.
|
||||
For the graphical interface plain Win32 code was used.
|
||||
|
||||
How to install
|
||||
==========================================================================
|
||||
Just unzip the content of the zipfile to your dolphin plugin dir and place
|
||||
sdl.dll in the root dir.
|
||||
|
||||
example config:
|
||||
[C:]
|
||||
|
|
||||
+-Dolphin Dir
|
||||
+-DolphinWx.exe File
|
||||
+-SDL.dll File
|
||||
|
|
||||
+-Plugins Dir
|
||||
+-nJoy.dll File
|
||||
|
||||
|
||||
FAQ
|
||||
==========================================================================
|
||||
|
||||
What's SDL???
|
||||
SDL is the Simple DirectMedia Layer written by Sam Lantinga.
|
||||
It provides an API for audio, video, input ...
|
||||
For more information go to http://www.libsdl.org/
|
||||
|
||||
Where can I download the latest releases???
|
||||
nJoy will be released @ www.multigesture.net
|
||||
|
||||
Can I mirror this file???
|
||||
Sure, just don't forget to add a link to:
|
||||
www.multigesture.net OR www.dolphin-emu.com
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Why should I use nJoy instead of the default input plugin???
|
||||
At this moment the default plugin only supports keyboard input.
|
||||
nJoy supports Joysticks. And besides that, if you have an GC-adapter
|
||||
you can use your original GC controllers with dolphin !
|
||||
|
||||
Could you add [insert feature here] please???
|
||||
no.
|
||||
|
||||
But perhaps...
|
||||
NO!
|
||||
|
||||
Hmm... There is coming smoke out of my pc, wtf?
|
||||
err, this plugin comes without any warranty,
|
||||
use it at own risk :)
|
||||
|
||||
What should I do if my question isn't listed here???
|
||||
Just panic, call 911 or leave a message on:
|
||||
(1) Emutalk http://www.emutalk.net/forumdisplay.php?f=100
|
||||
(2) NGemu http://forums.ngemu.com/dolphin-discussion/
|
||||
|
||||
Thanks / Greetings
|
||||
==========================================================================
|
||||
|
||||
Special Thanks too:
|
||||
F|RES & ector
|
||||
|
||||
Greetings too:
|
||||
`plot`, Absolute0, Aprentice, Bositman, Brice, ChaosCode, CKemu,
|
||||
CoDeX, Dave2001, dn, drk||Raziel, Florin, Gent, Gigaherz, Hacktarux,
|
||||
icepir8, JegHegy, Linker, Linuzappz, Martin64, Muad, Knuckles, Raziel,
|
||||
Refraction, Rudy_x, Shadowprince, Snake785, Saqib, vEX, yaz0r,
|
||||
Zilmar, Zenogais and ZeZu.
|
||||
|
||||
AAaannd everyone else I forgot ;)...
|
||||
@@ -1,60 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Plugin_nJoy_SDL.rc
|
||||
//
|
||||
#define IDD_CONFIG 101
|
||||
#define IDB_BITMAP1 102
|
||||
#define IDD_ABOUT 103
|
||||
#define IDB_BITMAP2 104
|
||||
#define IDC_JOYNAME 1001
|
||||
#define IDC_JOYATTACH 1002
|
||||
|
||||
#define IDC_SHOULDERL 1010
|
||||
#define IDC_SHOULDERR 1011
|
||||
#define IDC_A 1012
|
||||
#define IDC_B 1013
|
||||
#define IDC_X 1014
|
||||
#define IDC_Y 1015
|
||||
#define IDC_Z 1016
|
||||
#define IDC_START 1017
|
||||
|
||||
#define IDC_DPAD 1018
|
||||
#define IDC_MX 1019
|
||||
#define IDC_MY 1020
|
||||
#define IDC_SX 1021
|
||||
#define IDC_SY 1022
|
||||
|
||||
#define IDC_DEADZONE 1023
|
||||
#define IDC_HALFPRESS 1024
|
||||
|
||||
#define IDTEXT_SHOULDERL 2010
|
||||
#define IDTEXT_SHOULDERR 2011
|
||||
#define IDTEXT_A 2012
|
||||
#define IDTEXT_B 2013
|
||||
#define IDTEXT_X 2014
|
||||
#define IDTEXT_Y 2015
|
||||
#define IDTEXT_Z 2016
|
||||
#define IDTEXT_START 2017
|
||||
|
||||
#define IDTEXT_DPAD 2018
|
||||
#define IDTEXT_MX 2019
|
||||
#define IDTEXT_MY 2020
|
||||
#define IDTEXT_SX 2021
|
||||
#define IDTEXT_SY 2022
|
||||
|
||||
|
||||
#define IDC_ABOUT_TEXT 1032
|
||||
#define IDC_ABOUT_TEXT2 1033
|
||||
#define IDC_ABOUT_TEXT3 1034
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1036
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user