fix njoy build for non win32 os, and small osx64 build fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1965 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e6d78d3447
commit
8f2d1136a7
|
@ -211,6 +211,7 @@ env['HAVE_AO'] = conf.CheckPKG('ao')
|
|||
#osx 64 specifics
|
||||
if sys.platform == 'darwin':
|
||||
if env['osx'] == '64cocoa':
|
||||
env['nowx'] = True
|
||||
compileFlags += ['-arch' , 'x86_64' ]
|
||||
conf.Define('MAP_32BIT', 0)
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#include "../Debugger/Debugger.h"
|
||||
#include "../Debugger/File.h"
|
||||
extern CDebugger* m_frame;
|
||||
#endif
|
||||
#include "../Debugger/File.h"
|
||||
|
||||
// --------------------
|
||||
// On and off
|
||||
|
|
|
@ -179,9 +179,6 @@ void DllConfig(HWND _hParent)
|
|||
#elif defined(HAVE_WX) && HAVE_WX
|
||||
ConfigDialog frame(NULL);
|
||||
frame.ShowModal();
|
||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||
ConfigDialog frame(NULL);
|
||||
frame.ShowModal();
|
||||
#endif
|
||||
SaveConfig();
|
||||
}
|
||||
|
@ -511,10 +508,10 @@ void cocoa_Read(int _numPAD, SPADStatus* _pPADStatus)
|
|||
//printf("error prox client\n");
|
||||
}
|
||||
|
||||
int cocoaKey = (int)[proxy keyCode];
|
||||
long cocoaKey = (long)[proxy keyCode];
|
||||
|
||||
int i;
|
||||
if ((int)[proxy type] == 10)
|
||||
if ((long)[proxy type] == 10)
|
||||
{
|
||||
for (i = 0; i < NUMCONTROLS; i++) {
|
||||
if (cocoaKey == pad[_numPAD].keyForControl[i]) {
|
||||
|
|
|
@ -229,7 +229,9 @@ std::string ShowStatus(int VirtualController)
|
|||
joysticks[0].ID, joysticks[1].ID, joysticks[2].ID, joysticks[3].ID,
|
||||
controllertype, triggertype,
|
||||
joy0, joy1, joy2, joy3,
|
||||
#ifdef _WIN32
|
||||
XInput::IsConnected(0), XInput::GetXI(0, XI_TRIGGER_L), XInput::GetXI(0, XI_TRIGGER_R),
|
||||
#endif
|
||||
StrAxes.c_str(), StrHats.c_str(), StrBut.c_str(),
|
||||
Axes, Balls, Hats, Buttons
|
||||
);
|
||||
|
|
|
@ -366,7 +366,9 @@ void ConfigBox::UpdateGUI(int _notebookpage)
|
|||
m_JoyShoulderL[_notebookpage]->GetValue().ToLong(&Left);
|
||||
m_JoyShoulderR[_notebookpage]->GetValue().ToLong(&Right);
|
||||
bool AnalogTrigger = (Left >= 1000 || Right >= 1000);
|
||||
#ifdef _WIN32
|
||||
bool XInput = XInput::IsConnected(0);
|
||||
#endif
|
||||
|
||||
m_JoyDpadUp[_notebookpage]->Show(!Hat);
|
||||
m_JoyDpadLeft[_notebookpage]->Show(!Hat);
|
||||
|
@ -390,7 +392,11 @@ void ConfigBox::UpdateGUI(int _notebookpage)
|
|||
m_CBShowAdvanced[_notebookpage]->SetValue(g_Config.bShowAdvanced);
|
||||
|
||||
// Controller type values
|
||||
#ifdef _WIN32
|
||||
if (!XInput) m_TriggerType[_notebookpage]->SetSelection(CTL_TRIGGER_SDL);
|
||||
#else
|
||||
m_TriggerType[_notebookpage]->SetSelection(CTL_TRIGGER_SDL);
|
||||
#endif
|
||||
|
||||
// Advanced settings
|
||||
m_CoBDiagonal[_notebookpage]->SetValue(wxString::FromAscii(g_Config.SDiagonal.at(_notebookpage).c_str()));
|
||||
|
|
|
@ -394,6 +394,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
|||
}
|
||||
|
||||
// Check for a XInput trigger
|
||||
#ifdef _WIN32
|
||||
if(XInput)
|
||||
{
|
||||
for(int i = 0; i <= XI_TRIGGER_R; i++)
|
||||
|
@ -406,6 +407,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check for keyboard action
|
||||
if (g_Pressed && Button)
|
||||
|
@ -495,4 +497,4 @@ void ConfigBox::DoGetButtons(int GetId)
|
|||
//Console::Print("IsRunning: %i\n", m_ButtonMappingTimer->IsRunning());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////// Configure button mapping
|
||||
/////////////////////////////////////////////////////////// Configure button mapping
|
||||
|
|
|
@ -731,16 +731,20 @@ void GetJoyState(int controller)
|
|||
joystate[controller].axis[CTL_SUB_Y] = SDL_JoystickGetAxis(joystate[controller].joy, joysticks[controller].axis[CTL_SUB_Y]);
|
||||
|
||||
// Update trigger axises
|
||||
#ifdef _WIN32
|
||||
if (joysticks[controller].triggertype == CTL_TRIGGER_SDL)
|
||||
{
|
||||
#endif
|
||||
joystate[controller].axis[CTL_L_SHOULDER] = SDL_JoystickGetAxis(joystate[controller].joy, joysticks[controller].buttons[CTL_L_SHOULDER] - 1000);
|
||||
joystate[controller].axis[CTL_R_SHOULDER] = SDL_JoystickGetAxis(joystate[controller].joy, joysticks[controller].buttons[CTL_R_SHOULDER] - 1000);
|
||||
#ifdef _WIN32
|
||||
}
|
||||
else
|
||||
{
|
||||
joystate[controller].axis[CTL_L_SHOULDER] = XInput::GetXI(0, joysticks[controller].buttons[CTL_L_SHOULDER] - 1000);
|
||||
joystate[controller].axis[CTL_R_SHOULDER] = XInput::GetXI(0, joysticks[controller].buttons[CTL_R_SHOULDER] - 1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Debugging
|
||||
Console::ClearScreen();
|
||||
|
|
Loading…
Reference in New Issue