mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Commiting a Linux fix, and along with it is my current work on the nJoy plugin to make it better and use axises as buttons, buttons as axises, and axises as the triggers.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1372 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -71,6 +71,7 @@ dirs = [
|
||||
'Source/Plugins/Plugin_DSP_NULL/Src',
|
||||
'Source/Plugins/Plugin_PadSimple/Src',
|
||||
'Source/Plugins/Plugin_nJoy_SDL/Src',
|
||||
'Source/Plugins/Plugin_nJoy_Testing/Src',
|
||||
'Source/Plugins/Plugin_Wiimote/Src',
|
||||
'Source/Core/DolphinWX/Src',
|
||||
]
|
||||
|
||||
@@ -654,9 +654,9 @@ void CISOProperties::PatchList_Save()
|
||||
void CISOProperties::ChangeEditPatchEntry(wxSpinEvent& event)
|
||||
{
|
||||
PatchEngine::PatchEntry pE = onFrame.at(Patches->GetSelection()).entries.at(event.GetPosition());
|
||||
EditPatchOffset->SetValue(wxString::Format("%08X", pE.address));
|
||||
EditPatchOffset->SetValue(wxString::Format(_("%08X"), pE.address));
|
||||
EditPatchType->SetSelection(pE.type);
|
||||
EditPatchValue->SetValue(wxString::Format("%08X", pE.value));
|
||||
EditPatchValue->SetValue(wxString::Format(_("%08X"), pE.value));
|
||||
}
|
||||
|
||||
void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
|
||||
@@ -668,7 +668,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
|
||||
int selection = Patches->GetSelection();
|
||||
std::string currentName = onFrame.at(selection).name;
|
||||
std::vector<PatchEngine::PatchEntry> currentEntries = onFrame.at(selection).entries;
|
||||
wxDialog* dEditPatch = new wxDialog(this, IDD_EDITPATCH, wxString::Format("Edit Patch: %s", currentName.c_str()), wxDefaultPosition, wxSize(300, -1));
|
||||
wxDialog* dEditPatch = new wxDialog(this, IDD_EDITPATCH, wxString::Format(_("Edit Patch: %s"), currentName.c_str()), wxDefaultPosition, wxSize(300, -1));
|
||||
|
||||
wxBoxSizer* sEditPatch = new wxBoxSizer(wxVERTICAL);
|
||||
wxStaticText* EditPatchNameText = new wxStaticText(dEditPatch, ID_EDITPATCH_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize);
|
||||
@@ -676,7 +676,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
|
||||
EditPatchName->SetValue(wxString::FromAscii(currentName.c_str()));
|
||||
wxStaticText* EditPatchOffsetText = new wxStaticText(dEditPatch, ID_EDITPATCH_OFFSET_TEXT, _("Offset:"), wxDefaultPosition, wxDefaultSize);
|
||||
EditPatchOffset = new wxTextCtrl(dEditPatch, ID_EDITPATCH_OFFSET, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
|
||||
EditPatchOffset->SetValue(wxString::Format("%08X", currentEntries.at(0).address));
|
||||
EditPatchOffset->SetValue(wxString::Format(_("%08X"), currentEntries.at(0).address));
|
||||
wxSpinButton* EntrySelection = new wxSpinButton(dEditPatch, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
|
||||
EntrySelection->SetRange(0, currentEntries.size());
|
||||
wxArrayString wxArrayStringFor_EditPatchType;
|
||||
@@ -686,7 +686,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
|
||||
EditPatchType->SetSelection((int)currentEntries.at(0).type);
|
||||
wxStaticText* EditPatchValueText = new wxStaticText(dEditPatch, ID_EDITPATCH_VALUE_TEXT, _("Value:"), wxDefaultPosition, wxDefaultSize);
|
||||
EditPatchValue = new wxTextCtrl(dEditPatch, ID_EDITPATCH_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
|
||||
EditPatchValue->SetValue(wxString::Format("%08X", currentEntries.at(0).value));
|
||||
EditPatchValue->SetValue(wxString::Format(_("%08X"), currentEntries.at(0).value));
|
||||
wxBoxSizer* sEditPatchName = new wxBoxSizer(wxHORIZONTAL);
|
||||
sEditPatchName->Add(EditPatchNameText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sEditPatchName->Add(EditPatchName, 1, wxEXPAND|wxALL, 5);
|
||||
|
||||
@@ -44,7 +44,7 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||
case 0xd73338cf: // IPL
|
||||
case 0x42f64ac4: // Luigi (after fix)
|
||||
case 0x4be6a5cb: // AC, Pikmin (after fix)
|
||||
DebugLog("JAC ucode chosen");
|
||||
printf("JAC ucode chosen");
|
||||
return new CUCode_Jac(_rMailHandler);
|
||||
|
||||
case 0x3ad3b7ac: // Naruto3
|
||||
@@ -56,27 +56,27 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||
case 0x07f88145: // bustamove, ikaruga, fzero, robotech battle cry, star soldier, soul calibur2,
|
||||
// Zelda:OOT, Tony hawk, viewtiful joe
|
||||
case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080
|
||||
DebugLog("AX ucode chosen, yay!");
|
||||
printf("AX ucode chosen, yay!");
|
||||
return new CUCode_AX(_rMailHandler);
|
||||
|
||||
case 0x6CA33A6D: // DK Jungle Beat
|
||||
case 0x86840740: // zelda
|
||||
case 0x56d36052: // mario
|
||||
case 0x2fcdf1ec: // mariokart, zelda 4 swords
|
||||
DebugLog("Zelda ucode chosen");
|
||||
printf("Zelda ucode chosen");
|
||||
return new CUCode_Zelda(_rMailHandler);
|
||||
|
||||
// WII CRCs
|
||||
case 0x6c3f6f94: // zelda - PAL
|
||||
case 0xd643001f: // mario galaxy - PAL
|
||||
DebugLog("Zelda Wii ucode chosen");
|
||||
printf("Zelda Wii ucode chosen");
|
||||
return new CUCode_Zelda(_rMailHandler);
|
||||
|
||||
case 0x5ef56da3: // AX demo
|
||||
case 0x347112ba: // raving rabbits
|
||||
case 0xfa450138: // wii sports - PAL
|
||||
case 0xadbc06bd: // Elebits
|
||||
DebugLog("Wii - AXWii chosen");
|
||||
printf("Wii - AXWii chosen");
|
||||
return new CUCode_AXWii(_rMailHandler, _CRC);
|
||||
|
||||
default:
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#else
|
||||
#endif
|
||||
//#define USE_AA
|
||||
#define AA_AMMOUNT 16
|
||||
struct MESSAGE
|
||||
{
|
||||
MESSAGE() {}
|
||||
@@ -188,7 +189,7 @@ bool Renderer::Create2()
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
#ifdef USE_AA
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, s_RenderTargets[i]);
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 4, GL_RGBA, nBackbufferWidth, nBackbufferHeight);
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, AA_AMMOUNT, GL_RGBA, nBackbufferWidth, nBackbufferHeight);
|
||||
#endif
|
||||
}
|
||||
s_nCurTarget = 0;
|
||||
@@ -215,7 +216,7 @@ bool Renderer::Create2()
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
#ifdef USE_AA
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, s_ZBufferTarget);
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 4, GL_RGBA, nBackbufferWidth, nBackbufferHeight);
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, AA_AMMOUNT, GL_RGBA, nBackbufferWidth, nBackbufferHeight);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -223,7 +224,7 @@ bool Renderer::Create2()
|
||||
glGenRenderbuffersEXT( 1, (GLuint *)&s_DepthTarget);
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, s_DepthTarget);
|
||||
#ifdef USE_AA
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 4, GL_DEPTH24_STENCIL8_EXT, nBackbufferWidth, nBackbufferHeight);
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, AA_AMMOUNT, GL_DEPTH24_STENCIL8_EXT, nBackbufferWidth, nBackbufferHeight);
|
||||
#else
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT, nBackbufferWidth, nBackbufferHeight);
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 375 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,92 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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 "AboutBox.h"
|
||||
#include "../nJoy.h"
|
||||
#include "Images/njoy.xpm"
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(AboutBox,wxDialog)
|
||||
EVT_CLOSE(AboutBox::OnClose)
|
||||
EVT_BUTTON(ID_OK, AboutBox::OKClick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
AboutBox::AboutBox(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
CreateGUIControls();
|
||||
}
|
||||
|
||||
AboutBox::~AboutBox()
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
void AboutBox::CreateGUIControls()
|
||||
{
|
||||
SetTitle(wxT("About: nJoy Input Plugin"));
|
||||
SetIcon(wxNullIcon);
|
||||
//SetSize(8,8,200,399);
|
||||
SetClientSize(200,376);
|
||||
Center();
|
||||
|
||||
#ifndef _WIN32
|
||||
// Force a 8pt font so that it looks more or less "correct" regardless of the default font setting
|
||||
wxFont f(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL);
|
||||
SetFont(f);
|
||||
#endif
|
||||
|
||||
m_thankyoutext = new wxStaticText(this, ID_THANKYOU, wxT(THANKYOU), wxPoint(18,196), wxDefaultSize, 0, wxT(THANKYOU));
|
||||
m_thankyoutext->Wrap(167);
|
||||
m_specialthanks = new wxStaticText(this, ID_SPECIALTHANKS, wxT("F|RES and ector."), wxPoint(18,153), wxDefaultSize, 0, wxT("F|RES and ector."));
|
||||
m_pluginversion = new wxStaticText(this, ID_PLUGINVERSION, wxT("nJoy v"INPUT_VERSION" by Falcon4ever\n" "Release: "RELDAY"/"RELMONTH"/"RELYEAR"\n" "www.multigesture.net"), wxPoint(18,80), wxDefaultSize, 0, wxT("nJoy v"INPUT_VERSION" by Falcon4ever\n" "Release: "RELDAY"/"RELMONTH"/"RELYEAR"\n" "www.multigesture.net"));
|
||||
m_OK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(116,343), wxSize(75,25), 0, wxDefaultValidator, wxT("OK"));
|
||||
m_version = new wxStaticText(this, ID_STATUSV, wxT("PUBLIC RELEASE"), wxPoint(14,349), wxDefaultSize, 0, wxT("PUBLIC RELEASE"));
|
||||
m_thankyougroup = new wxStaticBox(this, IDG_THANKYOU, wxT("Greetings to:"), wxPoint(10,180), wxSize(180,160));
|
||||
m_specialthanksgroup = new wxStaticBox(this, IDG_SPECIALTHANKS, wxT("Special thanks to:"), wxPoint(10,135), wxSize(180,39));
|
||||
m_pluginversiongroup = new wxStaticBox(this, IDG_PLUGINVERSION, wxT("Plugin info:"), wxPoint(10,61), wxSize(180,68));
|
||||
|
||||
wxBitmap WxStaticBitmap1_BITMAP(AboutBox_WxStaticBitmap1_XPM);
|
||||
m_njoylogo = new wxStaticBitmap(this, ID_AWESOMEPICTURE, WxStaticBitmap1_BITMAP, wxPoint(-1,-2), wxSize(200,60));
|
||||
}
|
||||
|
||||
void AboutBox::OnClose(wxCloseEvent& /*event*/)
|
||||
{
|
||||
EndModal(0);
|
||||
}
|
||||
|
||||
void AboutBox::OKClick(wxCommandEvent& event)
|
||||
{
|
||||
if (event.GetId() == ID_OK)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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/
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#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
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,239 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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/
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#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_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_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 GetInputs(wxCommandEvent& event);
|
||||
void GetHats(int ID);
|
||||
|
||||
void SetButtonText(int id, char text[128]);
|
||||
};
|
||||
|
||||
#endif
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
name = "Plugin_nJoy_Testing"
|
||||
|
||||
files = [
|
||||
'nJoy.cpp',
|
||||
'GUI/AboutBox.cpp',
|
||||
'GUI/ConfigBox.cpp',
|
||||
]
|
||||
|
||||
padenv = env.Clone()
|
||||
padenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common' ],
|
||||
)
|
||||
if not env['osx64']:
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,171 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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/
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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
|
||||
// ¯¯¯¯¯¯
|
||||
|
||||
#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
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
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
|
||||
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
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
void GetJoyState(int controller);
|
||||
int Search_Devices();
|
||||
void DEBUG_INIT();
|
||||
void DEBUG_QUIT();
|
||||
|
||||
void SaveConfig();
|
||||
void LoadConfig();
|
||||
Binary file not shown.
@@ -0,0 +1,115 @@
|
||||
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 ;)...
|
||||
Reference in New Issue
Block a user