mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Fix a small misspell in OGL config, Fix the toggle fullscreen button when rendering to separate window + a weird issue related to rendering to main.
Code cleanup in nJoy i had around for a while, it also adds code to support SDL 1.3's force feedback API and is more stable (will not crash anymore on stop when rumble is enabled) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4459 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -28,9 +28,6 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
// Include
|
||||
// ---------
|
||||
#include "ConfigBox.h"
|
||||
@ -39,17 +36,12 @@
|
||||
|
||||
extern bool g_EmulatorRunning;
|
||||
|
||||
|
||||
/* If we don't use this hack m_MainSizer->GetMinSize().GetWidth() will not change
|
||||
when we enable and disable bShowAdvanced */
|
||||
bool StrangeHack = true;
|
||||
|
||||
// Set PAD status
|
||||
// --------------
|
||||
void PADConfigDialognJoy::PadGetStatus()
|
||||
{
|
||||
/* Return if it's not detected. The ID should never be less than zero here, it can only be that
|
||||
because of a manual ini file change, but we make that check anway. */
|
||||
// Return if it's not detected. The ID should never be less than zero here, it can only be that
|
||||
// because of a manual ini file change, but we make that check anway.
|
||||
if(PadMapping[notebookpage].ID < 0 || PadMapping[notebookpage].ID >= SDL_NumJoysticks())
|
||||
{
|
||||
m_TStatusIn[notebookpage]->SetLabel(wxT("Not connected")); m_TStatusOut[notebookpage]->SetLabel(wxT("Not connected"));
|
||||
@ -62,13 +54,6 @@ void PADConfigDialognJoy::PadGetStatus()
|
||||
int PhysicalDevice = PadMapping[notebookpage].ID;
|
||||
int TriggerType = PadMapping[notebookpage].triggertype;
|
||||
|
||||
|
||||
// Analog stick
|
||||
// -----------------
|
||||
// Set Deadzones perhaps out of function
|
||||
//int deadzone = (int)(((float)(128.00/100.00)) * (float)(PadMapping[_numPAD].deadzone+1));
|
||||
//int deadzone2 = (int)(((float)(-128.00/100.00)) * (float)(PadMapping[_numPAD].deadzone+1));
|
||||
|
||||
// Get original values
|
||||
int main_x = PadState[notebookpage].axis[InputCommon::CTL_MAIN_X];
|
||||
int main_y = PadState[notebookpage].axis[InputCommon::CTL_MAIN_Y];
|
||||
@ -184,10 +169,6 @@ std::string ShowStatus(int VirtualController)
|
||||
int Hats = joyinfo[PhysicalDevice].NumHats;
|
||||
int Buttons = joyinfo[PhysicalDevice].NumButtons;
|
||||
|
||||
// Get version
|
||||
//SDL_version Version;
|
||||
//SDL_GetVersion(&Version);
|
||||
|
||||
// Update the internal values
|
||||
SDL_JoystickUpdate();
|
||||
|
||||
@ -256,11 +237,6 @@ void PADConfigDialognJoy::Update()
|
||||
"%s", ShowStatus(notebookpage).c_str()
|
||||
));
|
||||
#endif
|
||||
|
||||
//LogMsg("Abc%s\n", ShowStatus(notebookpage).c_str());
|
||||
|
||||
if(StrangeHack) PadGetStatus();
|
||||
if(!g_Config.bShowAdvanced) StrangeHack = false; else StrangeHack = true;
|
||||
}
|
||||
|
||||
|
||||
@ -317,45 +293,6 @@ void PADConfigDialognJoy::CreateAdvancedControls(int i)
|
||||
wxPoint(1, 1), wxDefaultSize);
|
||||
m_bmpDotOutC[i] = new wxStaticBitmap(m_pOutStatusC[i], wxID_ANY, CreateBitmapDot(),
|
||||
wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize);
|
||||
|
||||
|
||||
// Rerecording
|
||||
// ---------
|
||||
#ifdef RERECORDING
|
||||
// Create controls
|
||||
m_SizeRecording[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Input Recording"));
|
||||
m_CheckRecording[i] = new wxCheckBox(m_Controller[i], ID_RECORDING, wxT("Record input"));
|
||||
m_CheckPlayback[i] = new wxCheckBox(m_Controller[i], ID_PLAYBACK, wxT("Play back input"));
|
||||
m_BtnSaveRecording[i] = new wxButton(m_Controller[i], ID_SAVE_RECORDING, wxT("Save recording"), wxDefaultPosition, wxDefaultSize);
|
||||
|
||||
// Tool tips
|
||||
m_CheckRecording[i]->SetToolTip(wxT("Your recording will be saved to pad-record.bin in the Dolphin dir when you stop the game"));
|
||||
m_CheckPlayback[i]->SetToolTip(wxT("Play back the pad-record.bin file from the Dolphin dir"));
|
||||
m_BtnSaveRecording[i]->SetToolTip(wxT(
|
||||
"This will save the current recording to pad-record.bin. Your recording will\n"
|
||||
"also be automatically saved every 60 * 10 frames. And when you shut down the\n"
|
||||
"game."));
|
||||
|
||||
// Sizers
|
||||
m_SizeRecording[i]->Add(m_CheckRecording[i], 0, wxEXPAND | wxALL, 1);
|
||||
m_SizeRecording[i]->Add(m_CheckPlayback[i], 0, wxEXPAND | wxALL, 1);
|
||||
m_SizeRecording[i]->Add(m_BtnSaveRecording[i], 0, wxEXPAND | wxALL, 1);
|
||||
|
||||
// Only enable these options for pad 0
|
||||
m_CheckRecording[i]->Enable(false); m_CheckRecording[0]->Enable(true);
|
||||
m_CheckPlayback[i]->Enable(false); m_CheckPlayback[0]->Enable(true);
|
||||
m_BtnSaveRecording[i]->Enable(false); m_BtnSaveRecording[0]->Enable(true);
|
||||
// Don't allow saving when we are not recording
|
||||
m_BtnSaveRecording[i]->Enable(g_EmulatorRunning && g_Config.bRecording);
|
||||
//sDevice[i]->Add(m_SizeRecording[i], 0, wxEXPAND | wxALL, 1);
|
||||
|
||||
// Set values
|
||||
//m_CheckRecording[0]->SetValue(g_Config.bRecording);
|
||||
//m_CheckPlayback[0]->SetValue(g_Config.bPlayback);
|
||||
|
||||
//Console::Print("m_CheckRecording: %i\n", g_Config.bRecording, g_Config.bPlayback);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,11 +83,6 @@ BEGIN_EVENT_TABLE(PADConfigDialognJoy,wxDialog)
|
||||
EVT_COMBOBOX(IDCB_CSTICK_DIAGONAL, PADConfigDialognJoy::ChangeSettings)
|
||||
EVT_CHECKBOX(IDCB_CSTICK_S_TO_C, PADConfigDialognJoy::ChangeSettings)
|
||||
EVT_CHECKBOX(IDCB_FILTER_SETTINGS, PADConfigDialognJoy::ChangeSettings)
|
||||
#ifdef RERECORDING
|
||||
EVT_CHECKBOX(ID_RECORDING, PADConfigDialognJoy::ChangeSettings)
|
||||
EVT_CHECKBOX(ID_PLAYBACK, PADConfigDialognJoy::ChangeSettings)
|
||||
EVT_BUTTON(ID_SAVE_RECORDING, PADConfigDialognJoy::GetButtons)
|
||||
#endif
|
||||
|
||||
EVT_BUTTON(IDB_SHOULDER_L, PADConfigDialognJoy::GetButtons)
|
||||
EVT_BUTTON(IDB_SHOULDER_R, PADConfigDialognJoy::GetButtons)
|
||||
@ -155,9 +150,6 @@ PADConfigDialognJoy::~PADConfigDialognJoy()
|
||||
|
||||
void PADConfigDialognJoy::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
/*m_pStatusBar->SetLabel(wxString::Format(
|
||||
"Key: %i", event.GetKeyCode()
|
||||
));*/
|
||||
g_Pressed = event.GetKeyCode();
|
||||
}
|
||||
|
||||
@ -171,7 +163,7 @@ void PADConfigDialognJoy::OnClose(wxCloseEvent& event)
|
||||
m_ConstantTimer->Stop();
|
||||
|
||||
// Close pads, unless we are running a game
|
||||
if(!g_EmulatorRunning) Shutdown();
|
||||
if (!g_EmulatorRunning) Shutdown();
|
||||
}
|
||||
|
||||
// Call about dialog
|
||||
@ -199,7 +191,7 @@ void PADConfigDialognJoy::OKClick(wxCommandEvent& event)
|
||||
if (event.GetId() == ID_OK)
|
||||
{
|
||||
DoSave(); // Save settings
|
||||
if(Debugging) PanicAlert("Done");
|
||||
if (Debugging) PanicAlert("Done");
|
||||
Close(); // Call OnClose()
|
||||
}
|
||||
}
|
||||
@ -219,7 +211,7 @@ void PADConfigDialognJoy::CancelClick(wxCommandEvent& event)
|
||||
void PADConfigDialognJoy::LogMsg(const char* format, ...)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if(Debugging)
|
||||
if (Debugging)
|
||||
{
|
||||
const int MaxMsgSize = 1024*2;
|
||||
char buffer[MaxMsgSize];
|
||||
@ -257,7 +249,7 @@ void PADConfigDialognJoy::DoSave(bool ChangePad, int Slot)
|
||||
// Replace "" with "-1" before we are saving
|
||||
ToBlank(false);
|
||||
|
||||
if(ChangePad)
|
||||
if (ChangePad)
|
||||
{
|
||||
// Since we are selecting the pad to save to by the Id we can't update it when we change the pad
|
||||
for(int i = 0; i < 4; i++) SaveButtonMapping(i, true);
|
||||
@ -304,34 +296,18 @@ void PADConfigDialognJoy::DoChangeJoystick()
|
||||
g_Config.Load(true);
|
||||
UpdateGUI(notebookpage); // Update the GUI
|
||||
}
|
||||
void PADConfigDialognJoy::PadOpen(int Open) // Open for slot 1, 2, 3 or 4
|
||||
{
|
||||
// Check that we got a good pad
|
||||
if (!joyinfo.at(PadMapping[Open].ID).Good)
|
||||
{
|
||||
PadState[Open].joy = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
PadState[Open].joy = SDL_JoystickOpen(PadMapping[Open].ID);
|
||||
}
|
||||
void PADConfigDialognJoy::PadClose(int Close) // Close for slot 1, 2, 3 or 4
|
||||
{
|
||||
if (SDL_JoystickOpened(PadMapping[Close].ID)) SDL_JoystickClose(PadState[Close].joy);
|
||||
PadState[Close].joy = NULL;
|
||||
}
|
||||
|
||||
// Notebook page changed
|
||||
void PADConfigDialognJoy::NotebookPageChanged(wxNotebookEvent& event)
|
||||
{
|
||||
// Save current settings now, don't wait for OK
|
||||
if(ControlsCreated && !g_Config.bSaveByID) DoSave(false, notebookpage);
|
||||
if (ControlsCreated && !g_Config.bSaveByID) DoSave(false, notebookpage);
|
||||
|
||||
// Update the global variable
|
||||
notebookpage = event.GetSelection();
|
||||
|
||||
// Update GUI
|
||||
if(ControlsCreated) UpdateGUI(notebookpage);
|
||||
if (ControlsCreated) UpdateGUI(notebookpage);
|
||||
}
|
||||
|
||||
// Replace the harder to understand -1 with "" for the sake of user friendliness
|
||||
@ -365,7 +341,7 @@ void PADConfigDialognJoy::SetButtonTextAll(int id, const char *text)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
// Safety check to avoid crash
|
||||
if(joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo[PadMapping[i].ID].Name == joyinfo[PadMapping[notebookpage].ID].Name)
|
||||
SetButtonText(id, text, i);
|
||||
};
|
||||
@ -376,7 +352,7 @@ void PADConfigDialognJoy::SaveButtonMappingAll(int Slot)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
// This can occur when no gamepad is detected
|
||||
if(joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo[PadMapping[i].ID].Name == joyinfo[PadMapping[Slot].ID].Name)
|
||||
SaveButtonMapping(i, false, Slot);
|
||||
}
|
||||
@ -384,7 +360,7 @@ void PADConfigDialognJoy::SaveButtonMappingAll(int Slot)
|
||||
|
||||
void PADConfigDialognJoy::UpdateGUIAll(int Slot)
|
||||
{
|
||||
if(Slot == -1)
|
||||
if (Slot == -1)
|
||||
{
|
||||
for (int i = 0; i < 4; i++) UpdateGUI(i);
|
||||
}
|
||||
@ -393,7 +369,7 @@ void PADConfigDialognJoy::UpdateGUIAll(int Slot)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
// Safety check to avoid crash
|
||||
if(joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo[PadMapping[i].ID].Name == joyinfo[PadMapping[Slot].ID].Name)
|
||||
UpdateGUI(i);
|
||||
}
|
||||
@ -412,11 +388,14 @@ void PADConfigDialognJoy::ChangeSettings( wxCommandEvent& event )
|
||||
g_Config.bShowAdvanced = m_CBShowAdvanced[notebookpage]->IsChecked();
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
UpdateGUI(i);
|
||||
m_CBShowAdvanced[i]->SetValue(g_Config.bShowAdvanced);
|
||||
m_sMainRight[i]->Show(g_Config.bShowAdvanced);
|
||||
}
|
||||
SizeWindow();
|
||||
// Resize the window without the need of any weird hack
|
||||
SetSizerAndFit(m_MainSizer);
|
||||
break;
|
||||
|
||||
// Advanced settings
|
||||
case IDCB_CHECKFOCUS:
|
||||
g_Config.bCheckFocus = m_CBCheckFocus[notebookpage]->IsChecked();
|
||||
@ -432,24 +411,6 @@ void PADConfigDialognJoy::ChangeSettings( wxCommandEvent& event )
|
||||
m_AdvancedMapFilter[i]->SetValue(g_Config.bNoTriggerFilter);
|
||||
}
|
||||
break;
|
||||
#ifdef RERECORDING
|
||||
case ID_RECORDING:
|
||||
g_Config.bRecording = m_CheckRecording[notebookpage]->IsChecked();
|
||||
if(g_Config.bRecording) g_Config.bPlayback = !g_Config.bRecording;
|
||||
for(int i = 0; i < 4; i++) m_CheckRecording[i]->SetValue(g_Config.bRecording);
|
||||
for(int i = 0; i < 4; i++) m_CheckPlayback[i]->SetValue(g_Config.bPlayback);
|
||||
break;
|
||||
case ID_PLAYBACK:
|
||||
g_Config.bPlayback = m_CheckPlayback[notebookpage]->IsChecked();
|
||||
if(g_Config.bPlayback) g_Config.bRecording = !g_Config.bPlayback;
|
||||
for(int i = 0; i < 4; i++) m_CheckPlayback[i]->SetValue(g_Config.bPlayback);
|
||||
for(int i = 0; i < 4; i++) m_CheckPlayback[i]->SetValue(g_Config.bRecording);
|
||||
break;
|
||||
case ID_SAVE_RECORDING:
|
||||
// Double check again that we are still running a game
|
||||
if (g_EmulatorRunning) Recording::Save();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case IDC_CONTROLTYPE:
|
||||
if(!g_Config.bSaveByID)
|
||||
@ -529,10 +490,6 @@ void PADConfigDialognJoy::UpdateGUI(int _notebookpage)
|
||||
m_CBCheckFocus[_notebookpage]->SetValue(g_Config.bCheckFocus);
|
||||
m_AdvancedMapFilter[_notebookpage]->SetValue(g_Config.bNoTriggerFilter);
|
||||
m_RStrength[_notebookpage]->SetSelection(g_Config.RumbleStrength);
|
||||
#ifdef RERECORDING
|
||||
m_CheckRecording[_notebookpage]->SetValue(g_Config.bRecording);
|
||||
m_CheckPlayback[_notebookpage]->SetValue(g_Config.bPlayback);
|
||||
#endif
|
||||
|
||||
// Replace the harder to understand -1 with "" for the sake of user friendliness
|
||||
ToBlank();
|
||||
@ -568,12 +525,12 @@ void PADConfigDialognJoy::OnPaint(wxPaintEvent &event)
|
||||
// Populate the config window
|
||||
void PADConfigDialognJoy::CreateGUIControls()
|
||||
{
|
||||
INFO_LOG(CONSOLE, "CreateGUIControls()\n");
|
||||
INFO_LOG(PAD, "CreateGUIControls()\n");
|
||||
|
||||
#ifndef _DEBUG
|
||||
SetTitle(wxT("Configure: nJoy v")wxT(INPUT_VERSION)wxT(" Input Plugin"));
|
||||
SetTitle(wxT("Configure: nJoy Input Plugin"));
|
||||
#else
|
||||
SetTitle(wxT("Configure: nJoy v")wxT(INPUT_VERSION)wxT(" (Debug) Input Plugin"));
|
||||
SetTitle(wxT("Configure: nJoy (Debug) Input Plugin"));
|
||||
#endif
|
||||
|
||||
SetIcon(wxNullIcon);
|
||||
@ -614,7 +571,7 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
|
||||
// Search for devices and add them to the device list
|
||||
wxArrayString arrayStringFor_Joyname; // The string array
|
||||
if(NumGoodPads > 0)
|
||||
if (NumGoodPads > 0)
|
||||
{
|
||||
for(int x = 0; (u32)x < joyinfo.size(); x++)
|
||||
{
|
||||
@ -829,6 +786,9 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
// Create objects for Rumble settings (general 4)
|
||||
m_RStrength[i] = new wxComboBox(m_Controller[i], IDC_RUMBLESTRENGTH, wxAS_RumbleStrength[0], wxDefaultPosition, wxSize(85, 20), wxAS_RumbleStrength, wxCB_READONLY);
|
||||
m_Rumble[i] = new wxCheckBox(m_Controller[i], IDC_ENABLERUMBLE, wxT("Enable Rumble"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
#if !SDL_VERSION_ATLEAST(1, 3, 0) && !defined(_WIN32)
|
||||
m_Rumble[i]->Disable();
|
||||
#endif
|
||||
|
||||
// Populate general settings 4
|
||||
m_gRumble[i] = new wxStaticBoxSizer( wxVERTICAL, m_Controller[i], wxT("Rumble settings"));
|
||||
@ -990,7 +950,7 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
m_sMain[i] = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_sMain[i]->Add(m_sMainLeft[i], 0, wxEXPAND | (wxALL), 0);
|
||||
m_sMain[i]->Add(m_sMainRight[i], 0, wxEXPAND | (wxRIGHT | wxTOP), 5);
|
||||
m_Controller[i]->SetSizer(m_sMain[i]); // Set the main sizer
|
||||
m_Controller[i]->SetSizerAndFit(m_sMain[i]); // Set the main sizer
|
||||
|
||||
// Show or hide it. We have to do this after we add it to its sizer
|
||||
m_sMainRight[i]->Show(g_Config.bShowAdvanced);
|
||||
@ -999,7 +959,6 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
UpdateGUI(i);
|
||||
} // end of loop
|
||||
|
||||
|
||||
// Populate buttons sizer.
|
||||
wxBoxSizer * m_sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_sButtons->Add(m_About, 0, (wxBOTTOM), 0);
|
||||
@ -1012,23 +971,14 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
m_MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_MainSizer->Add(m_Notebook, 0, wxEXPAND | wxALL, 5);
|
||||
m_MainSizer->Add(m_sButtons, 1, wxEXPAND | ( wxLEFT | wxRIGHT | wxBOTTOM), 5);
|
||||
this->SetSizer(m_MainSizer);
|
||||
SetSizerAndFit(m_MainSizer);
|
||||
|
||||
// Debugging
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
m_pStatusBar = new wxStaticText(this, IDT_DEBUGGING, wxT("Debugging"), wxPoint(135, 100), wxDefaultSize);
|
||||
#endif
|
||||
//m_pStatusBar2 = new wxStaticText(this, IDT_DEBUGGING2, wxT("Debugging2"), wxPoint(125, 200), wxDefaultSize);
|
||||
//m_pStatusBar->SetLabel(wxString::Format("Debugging text"));
|
||||
|
||||
/*m_TCDebugging = new wxTextCtrl(this, IDT_DEBUGGING3, _T(""), wxDefaultPosition, wxSize(400, 400),
|
||||
wxTE_RICH | wxTE_MULTILINE | wxTE_DONTWRAP | wxNO_BORDER);
|
||||
wxBoxSizer * m_LogSizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_LogSizer->Add(m_TCDebugging, 0, wxEXPAND | (wxALL), 0);
|
||||
m_MainSizer->Add(m_LogSizer, 0, wxEXPAND | ( wxLEFT | wxRIGHT | wxBOTTOM), 5);*/
|
||||
|
||||
// Set window size
|
||||
SizeWindow();
|
||||
Center();
|
||||
|
||||
// All done
|
||||
@ -1037,8 +987,3 @@ void PADConfigDialognJoy::CreateGUIControls()
|
||||
// Replace the harder to understand -1 with "" for the sake of user friendliness
|
||||
ToBlank();
|
||||
}
|
||||
|
||||
void PADConfigDialognJoy::SizeWindow()
|
||||
{
|
||||
SetClientSize(m_MainSizer->GetMinSize().GetWidth(), m_MainSizer->GetMinSize().GetHeight());
|
||||
}
|
||||
|
@ -196,11 +196,6 @@ class PADConfigDialognJoy : public wxDialog
|
||||
*m_bmpSquareC[4], *m_bmpDotC[4], *m_bmpSquareOutC[4], *m_bmpDotOutC[4], *m_bmpAreaOutC[4];
|
||||
|
||||
int notebookpage; bool ControlsCreated;
|
||||
#ifdef RERECORDING
|
||||
wxStaticBoxSizer *m_SizeRecording[4];
|
||||
wxCheckBox *m_CheckRecording[4], *m_CheckPlayback[4];
|
||||
wxButton *m_BtnSaveRecording[4];
|
||||
#endif
|
||||
|
||||
private:
|
||||
enum
|
||||
@ -236,9 +231,6 @@ class PADConfigDialognJoy : public wxDialog
|
||||
IDCB_MAINSTICK_RADIUS, IDCB_MAINSTICK_CB_RADIUS, IDCB_MAINSTICK_DIAGONAL, IDCB_MAINSTICK_S_TO_C, IDT_MAINSTICK_DIAGONAL,
|
||||
IDCB_CSTICK_RADIUS, IDCB_CSTICK_CB_RADIUS, IDCB_CSTICK_DIAGONAL, IDCB_CSTICK_S_TO_C, IDT_CSTICK_DIAGONAL,
|
||||
IDT_TRIGGERS, IDCB_CHECKFOCUS, IDCB_FILTER_SETTINGS,
|
||||
#ifdef RERECORDING
|
||||
ID_RECORDING, ID_PLAYBACK, ID_SAVE_RECORDING,
|
||||
#endif
|
||||
|
||||
// Timers
|
||||
IDTM_CONSTANT, IDTM_BUTTON,
|
||||
@ -327,9 +319,6 @@ class PADConfigDialognJoy : public wxDialog
|
||||
|
||||
void DoChangeJoystick();
|
||||
|
||||
void PadOpen(int Open);
|
||||
void PadClose(int Close);
|
||||
|
||||
void UpdateGUI(int _notebookpage);
|
||||
|
||||
void ChangeSettings(wxCommandEvent& event);
|
||||
@ -338,7 +327,6 @@ class PADConfigDialognJoy : public wxDialog
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
void CreateAdvancedControls(int i);
|
||||
void SizeWindow();
|
||||
wxBitmap CreateBitmap();
|
||||
wxBitmap CreateBitmapDot();
|
||||
wxBitmap CreateBitmapArea(int,int);
|
||||
|
@ -86,10 +86,6 @@ void PADConfigDialognJoy::UpdateGUIButtonMapping(int controller)
|
||||
m_AdvancedMapFilter[controller]->SetValue(g_Config.bNoTriggerFilter);
|
||||
// Update Rumble checkbox
|
||||
m_Rumble[controller]->SetValue(PadMapping[controller].rumble);
|
||||
#ifdef RERECORDING
|
||||
m_CheckRecording[controller]->SetValue(g_Config.bRecording);
|
||||
m_CheckPlayback[controller]->SetValue(g_Config.bPlayback);
|
||||
#endif
|
||||
|
||||
// Update D-Pad
|
||||
if(PadMapping[controller].controllertype == InputCommon::CTL_DPAD_HAT)
|
||||
@ -153,9 +149,6 @@ void PADConfigDialognJoy::SaveButtonMapping(int controller, bool DontChangeId, i
|
||||
m_JoyButtonZ[FromSlot]->GetValue().ToLong(&value); PadMapping[controller].buttons[InputCommon::CTL_Z_TRIGGER] = value; tmp.clear();
|
||||
m_JoyButtonStart[FromSlot]->GetValue().ToLong(&value); PadMapping[controller].buttons[InputCommon::CTL_START] = value; tmp.clear();
|
||||
|
||||
//LogMsg("PadMapping[%i].triggertype = %i, m_TriggerType[%i]->GetSelection() = %i\n",
|
||||
// controller, PadMapping[controller].triggertype, FromSlot, m_TriggerType[FromSlot]->GetSelection());
|
||||
|
||||
// The halfpress button
|
||||
m_JoyButtonHalfpress[FromSlot]->GetValue().ToLong(&value); PadMapping[controller].halfpress = value; tmp.clear();
|
||||
|
||||
@ -324,9 +317,6 @@ void PADConfigDialognJoy::DoGetButtons(int GetId)
|
||||
bool Stop = false; // Stop the timer
|
||||
// =======================
|
||||
|
||||
//INFO_LOG(CONSOLE, "Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
// GetButtonWaitingTimer, GetButtonWaitingID, GetId, m_ButtonMappingTimer->IsRunning());
|
||||
|
||||
// If the Id has changed or the timer is not running we should start one
|
||||
if( GetButtonWaitingID != GetId || !m_ButtonMappingTimer->IsRunning() )
|
||||
{
|
||||
@ -430,12 +420,4 @@ void PADConfigDialognJoy::DoGetButtons(int GetId)
|
||||
wxT(" select another key with a higher key code."), pressed)
|
||||
, wxT("Notice"), wxICON_INFORMATION);
|
||||
}
|
||||
// ======================== Process results
|
||||
|
||||
// Debugging
|
||||
/*
|
||||
INFO_LOG(CONSOLE, "Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
PadMapping[0].halfpress, PadMapping[1].halfpress, PadMapping[2].halfpress, PadMapping[3].halfpress,
|
||||
m_JoyButtonHalfpress[0]->GetValue().c_str(), m_JoyButtonHalfpress[1]->GetValue().c_str(), m_JoyButtonHalfpress[2]->GetValue().c_str(), m_JoyButtonHalfpress[3]->GetValue().c_str()
|
||||
);*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user