mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Fix crazy svn changing trunk on last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2206 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
#include "../nJoy.h"
|
||||
#include "Images/controller.xpm"
|
||||
|
||||
extern bool emulator_running;
|
||||
extern bool g_EmulatorRunning;
|
||||
////////////////////////
|
||||
|
||||
/* If we don't use this hack m_MainSizer->GetMinSize().GetWidth() will not change
|
||||
@ -70,8 +70,10 @@ void ConfigBox::PadGetStatus()
|
||||
int PhysicalDevice = PadMapping[notebookpage].ID;
|
||||
int TriggerType = PadMapping[notebookpage].triggertype;
|
||||
|
||||
// Get pad status
|
||||
GetJoyState(notebookpage);
|
||||
// Check that Dolphin is in focus, otherwise don't update the pad status
|
||||
if (!g_Config.bCheckFocus && IsFocus())
|
||||
InputCommon::GetJoyState(PadState[notebookpage], PadMapping[notebookpage], notebookpage, joyinfo[PadMapping[notebookpage].ID].NumButtons);
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// Analog stick
|
||||
@ -81,8 +83,8 @@ void ConfigBox::PadGetStatus()
|
||||
//int deadzone2 = (int)(((float)(-128.00/100.00)) * (float)(PadMapping[_numPAD].deadzone+1));
|
||||
|
||||
// Get original values
|
||||
int main_x = PadState[notebookpage].axis[CTL_MAIN_X];
|
||||
int main_y = PadState[notebookpage].axis[CTL_MAIN_Y];
|
||||
int main_x = PadState[notebookpage].axis[InputCommon::CTL_MAIN_X];
|
||||
int main_y = PadState[notebookpage].axis[InputCommon::CTL_MAIN_Y];
|
||||
//int sub_x = (PadState[_numPAD].axis[CTL_SUB_X];
|
||||
//int sub_y = -(PadState[_numPAD].axis[CTL_SUB_Y];
|
||||
|
||||
@ -90,7 +92,7 @@ void ConfigBox::PadGetStatus()
|
||||
int main_x_after = main_x, main_y_after = main_y;
|
||||
if(PadMapping[notebookpage].bSquareToCircle)
|
||||
{
|
||||
std::vector<int> main_xy = Pad_Square_to_Circle(main_x, main_y, notebookpage);
|
||||
std::vector<int> main_xy = InputCommon::Pad_Square_to_Circle(main_x, main_y, notebookpage, PadMapping[notebookpage]);
|
||||
main_x_after = main_xy.at(0);
|
||||
main_y_after = main_xy.at(1);
|
||||
}
|
||||
@ -138,14 +140,14 @@ void ConfigBox::PadGetStatus()
|
||||
m_JoyShoulderR[notebookpage]->GetValue().ToLong(&Right);
|
||||
|
||||
// Get the trigger values
|
||||
int TriggerLeft = PadState[notebookpage].axis[CTL_L_SHOULDER];
|
||||
int TriggerRight = PadState[notebookpage].axis[CTL_R_SHOULDER];
|
||||
int TriggerLeft = PadState[notebookpage].axis[InputCommon::CTL_L_SHOULDER];
|
||||
int TriggerRight = PadState[notebookpage].axis[InputCommon::CTL_R_SHOULDER];
|
||||
|
||||
// Convert the triggers values
|
||||
if (PadMapping[notebookpage].triggertype == CTL_TRIGGER_SDL)
|
||||
if (PadMapping[notebookpage].triggertype == InputCommon::CTL_TRIGGER_SDL)
|
||||
{
|
||||
TriggerLeft = Pad_Convert(TriggerLeft);
|
||||
TriggerRight = Pad_Convert(TriggerRight);
|
||||
TriggerLeft = InputCommon::Pad_Convert(TriggerLeft);
|
||||
TriggerRight = InputCommon::Pad_Convert(TriggerRight);
|
||||
}
|
||||
|
||||
// If we don't have any axis selected for the shoulder buttons
|
||||
@ -153,8 +155,8 @@ void ConfigBox::PadGetStatus()
|
||||
if(Right < 1000) TriggerRight = 0;
|
||||
|
||||
// Get the digital values
|
||||
if(Left < 1000 && PadState[notebookpage].buttons[CTL_L_SHOULDER]) TriggerLeft = TriggerValue;
|
||||
if(Right < 1000 && PadState[notebookpage].buttons[CTL_R_SHOULDER]) TriggerRight = TriggerValue;
|
||||
if(Left < 1000 && PadState[notebookpage].buttons[InputCommon::CTL_L_SHOULDER]) TriggerLeft = TriggerValue;
|
||||
if(Right < 1000 && PadState[notebookpage].buttons[InputCommon::CTL_R_SHOULDER]) TriggerRight = TriggerValue;
|
||||
|
||||
m_TStatusTriggers[notebookpage]->SetLabel(wxString::Format(
|
||||
wxT("Left:%03i Right:%03i"),
|
||||
@ -192,6 +194,10 @@ 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();
|
||||
|
||||
@ -213,7 +219,7 @@ std::string ShowStatus(int VirtualController)
|
||||
}
|
||||
|
||||
return StringFromFormat(
|
||||
"PadMapping\n"
|
||||
//"Version: %i.%i.%i\n"
|
||||
"Enabled: %i %i %i %i\n"
|
||||
"ID: %i %i %i %i\n"
|
||||
"Controllertype: %i %i %i %i\n"
|
||||
@ -225,6 +231,7 @@ std::string ShowStatus(int VirtualController)
|
||||
"Hats: %s\n"
|
||||
"But: %s\n"
|
||||
"Device: Ax: %i Balls:%i Hats:%i But:%i",
|
||||
//Version.major, Version.minor, Version.patch,
|
||||
PadMapping[0].enabled, PadMapping[1].enabled, PadMapping[2].enabled, PadMapping[3].enabled,
|
||||
PadMapping[0].ID, PadMapping[1].ID, PadMapping[2].ID, PadMapping[3].ID,
|
||||
PadMapping[0].controllertype, PadMapping[1].controllertype, PadMapping[2].controllertype, PadMapping[3].controllertype,
|
||||
@ -233,7 +240,7 @@ std::string ShowStatus(int VirtualController)
|
||||
//PadState[PadMapping[0].ID].joy, PadState[PadMapping[1].ID].joy, PadState[PadMapping[2].ID].joy, PadState[PadMapping[3].ID].joy,
|
||||
|
||||
#ifdef _WIN32
|
||||
XInput::IsConnected(0), XInput::GetXI(0, XI_TRIGGER_L), XInput::GetXI(0, XI_TRIGGER_R),
|
||||
XInput::IsConnected(0), XInput::GetXI(0, InputCommon::XI_TRIGGER_L), XInput::GetXI(0, InputCommon::XI_TRIGGER_R),
|
||||
#endif
|
||||
StrAxes.c_str(), StrHats.c_str(), StrBut.c_str(),
|
||||
Axes, Balls, Hats, Buttons
|
||||
@ -245,10 +252,12 @@ std::string ShowStatus(int VirtualController)
|
||||
void ConfigBox::Update()
|
||||
{
|
||||
// Show the current status
|
||||
/*
|
||||
m_pStatusBar->SetLabel(wxString::Format(
|
||||
"%s", ShowStatus(notebookpage).c_str()
|
||||
));*/
|
||||
/**/
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
m_pStatusBar->SetLabel(wxString::Format(
|
||||
"%s", ShowStatus(notebookpage).c_str()
|
||||
));
|
||||
#endif
|
||||
|
||||
//LogMsg("Abc%s\n", ShowStatus(notebookpage).c_str());
|
||||
|
||||
@ -261,6 +270,10 @@ void ConfigBox::Update()
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void ConfigBox::CreateAdvancedControls(int i)
|
||||
{
|
||||
m_TStatusIn[i] = new wxStaticText(m_Controller[i], IDT_STATUS_IN, wxT("In"));
|
||||
m_TStatusOut[i] = new wxStaticText(m_Controller[i], IDT_STATUS_OUT, wxT("Out"));
|
||||
m_gStatusIn[i] = new wxStaticBoxSizer( wxHORIZONTAL, m_Controller[i], wxT("Main-stick (In) (Out)"));
|
||||
|
||||
m_pInStatus[i] = new wxPanel(m_Controller[i], ID_INSTATUS1 + i, wxDefaultPosition, wxDefaultSize);
|
||||
m_bmpSquare[i] = new wxStaticBitmap(m_pInStatus[i], ID_STATUSBMP1 + i, CreateBitmap(),
|
||||
//wxPoint(4, 15), wxSize(70,70));
|
||||
|
Reference in New Issue
Block a user