Emulated Wiimote: Enabled the roll and pitch function again (I had accidently disabled it in the last commit)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2220 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b932a53b68
commit
eb1c6163f7
|
@ -1187,7 +1187,7 @@ void ConfigDialog::UpdateGUI(int Slot)
|
||||||
has been initialized. Functions for that are basically already in place so these two options
|
has been initialized. Functions for that are basically already in place so these two options
|
||||||
could possibly be simplified to one option. */
|
could possibly be simplified to one option. */
|
||||||
m_ConnectRealWiimote[Page]->Enable(!g_EmulatorRunning);
|
m_ConnectRealWiimote[Page]->Enable(!g_EmulatorRunning);
|
||||||
m_UseRealWiimote[Page]->Enable((m_bEnableUseRealWiimote && g_RealWiiMotePresent && g_Config.bConnectRealWiimote) || !g_EmulatorRunning);
|
m_UseRealWiimote[Page]->Enable((m_bEnableUseRealWiimote && g_RealWiiMotePresent && g_Config.bConnectRealWiimote) || (!g_EmulatorRunning && g_Config.bConnectRealWiimote));
|
||||||
|
|
||||||
// Linux has no FindItem()
|
// Linux has no FindItem()
|
||||||
// Disable all pad items if no pads are detected
|
// Disable all pad items if no pads are detected
|
||||||
|
|
|
@ -449,6 +449,8 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||||
void ConfigDialog::PadGetStatus()
|
void ConfigDialog::PadGetStatus()
|
||||||
{
|
{
|
||||||
|
//Console::Print("SDL_WasInit: %i\n", SDL_WasInit(0));
|
||||||
|
|
||||||
// Return if it's not detected
|
// Return if it's not detected
|
||||||
if(WiiMoteEmu::PadMapping[Page].ID >= SDL_NumJoysticks())
|
if(WiiMoteEmu::PadMapping[Page].ID >= SDL_NumJoysticks())
|
||||||
{
|
{
|
||||||
|
@ -596,7 +598,5 @@ void ConfigDialog::UpdatePad(wxTimerEvent& WXUNUSED(event))
|
||||||
//LogMsg("Abc%s\n", ShowStatus(notebookpage).c_str());
|
//LogMsg("Abc%s\n", ShowStatus(notebookpage).c_str());
|
||||||
|
|
||||||
PadGetStatus();
|
PadGetStatus();
|
||||||
|
|
||||||
//Console::Print("a\n");
|
|
||||||
}
|
}
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
|
@ -39,7 +39,6 @@
|
||||||
#include "Logging.h" // for startConsoleWin, Console::Print, GetConsoleHwnd
|
#include "Logging.h" // for startConsoleWin, Console::Print, GetConsoleHwnd
|
||||||
#include "Config.h" // for g_Config
|
#include "Config.h" // for g_Config
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|
||||||
extern SWiimoteInitialize g_WiimoteInitialize;
|
extern SWiimoteInitialize g_WiimoteInitialize;
|
||||||
|
|
||||||
namespace WiiMoteEmu
|
namespace WiiMoteEmu
|
||||||
|
@ -341,8 +340,11 @@ void Initialize()
|
||||||
g_RecordingCurrentTime[i] = 0;
|
g_RecordingCurrentTime[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load avaliable pads
|
// Populate joyinfo for all attached devices if the configuration window is not already open
|
||||||
Search_Devices(joyinfo, NumPads, NumGoodPads);
|
if(!g_FrameOpen)
|
||||||
|
{
|
||||||
|
Search_Devices(joyinfo, NumPads, NumGoodPads);
|
||||||
|
}
|
||||||
|
|
||||||
/* The Nuncheck extension ID for homebrew applications that use the zero key. This writes 0x0000
|
/* The Nuncheck extension ID for homebrew applications that use the zero key. This writes 0x0000
|
||||||
in encrypted form (0xfefe) to 0xfe in the extension register. */
|
in encrypted form (0xfefe) to 0xfe in the extension register. */
|
||||||
|
@ -379,11 +381,14 @@ void Shutdown(void)
|
||||||
/* SDL_JoystickClose() crashes for some reason so I avoid this for now, SDL_Quit() should
|
/* SDL_JoystickClose() crashes for some reason so I avoid this for now, SDL_Quit() should
|
||||||
close the pads to I think */
|
close the pads to I think */
|
||||||
//if(SDL_JoystickOpened(PadMapping[i].ID)) SDL_JoystickClose(PadState[i].joy);
|
//if(SDL_JoystickOpened(PadMapping[i].ID)) SDL_JoystickClose(PadState[i].joy);
|
||||||
|
//PadState[i].joy = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the physical device info
|
// Clear the physical device info
|
||||||
joyinfo.clear();
|
joyinfo.clear();
|
||||||
|
NumPads = 0;
|
||||||
|
NumGoodPads = 0;
|
||||||
|
|
||||||
// Finally close SDL
|
// Finally close SDL
|
||||||
if (SDL_WasInit(0)) SDL_Quit();
|
if (SDL_WasInit(0)) SDL_Quit();
|
||||||
|
|
|
@ -45,6 +45,7 @@ void Update();
|
||||||
void LoadRecordedMovements();
|
void LoadRecordedMovements();
|
||||||
|
|
||||||
// Registers and calibration values
|
// Registers and calibration values
|
||||||
|
void ResetVariables();
|
||||||
void UpdateEeprom();
|
void UpdateEeprom();
|
||||||
void SetDefaultExtensionRegistry();
|
void SetDefaultExtensionRegistry();
|
||||||
|
|
||||||
|
|
|
@ -568,7 +568,7 @@ void FillReportAcc(wm_accel& _acc)
|
||||||
SingleShake(g_z, g_y);
|
SingleShake(g_z, g_y);
|
||||||
|
|
||||||
// Tilt Wiimote
|
// Tilt Wiimote
|
||||||
|
Tilt(g_x, g_y, g_z);
|
||||||
|
|
||||||
// Write final values
|
// Write final values
|
||||||
_acc.x = g_x;
|
_acc.x = g_x;
|
||||||
|
|
|
@ -228,6 +228,9 @@ extern "C" void Shutdown(void)
|
||||||
if(frame) frame->UpdateGUI();
|
if(frame) frame->UpdateGUI();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Reset the variables
|
||||||
|
WiiMoteEmu::ResetVariables();
|
||||||
|
|
||||||
/* Don't shut down the wiimote when we still have the config window open, we may still want
|
/* Don't shut down the wiimote when we still have the config window open, we may still want
|
||||||
want to use the Wiimote in the config window. */
|
want to use the Wiimote in the config window. */
|
||||||
return;
|
return;
|
||||||
|
@ -238,7 +241,7 @@ extern "C" void Shutdown(void)
|
||||||
#endif
|
#endif
|
||||||
WiiMoteEmu::Shutdown();
|
WiiMoteEmu::Shutdown();
|
||||||
|
|
||||||
//Console::Close();
|
Console::Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,13 @@ void Shutdown()
|
||||||
// Always change this variable
|
// Always change this variable
|
||||||
g_EmulatorRunning = false;
|
g_EmulatorRunning = false;
|
||||||
|
|
||||||
// Don't shutdown if the configuration window is still showing
|
// Stop debugging
|
||||||
|
#ifdef _DEBUG
|
||||||
|
DEBUG_QUIT();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Don't shutdown the gamepad if the configuration window is still showing
|
||||||
|
// Todo: Coordinate with the Wiimote plugin, SDL_Quit() will remove the pad for it to
|
||||||
if (m_frame) return;
|
if (m_frame) return;
|
||||||
|
|
||||||
/* Close all devices carefully. We must check that we are not accessing any undefined
|
/* Close all devices carefully. We must check that we are not accessing any undefined
|
||||||
|
@ -329,10 +335,6 @@ void Shutdown()
|
||||||
// Remove the pointer to the initialize data
|
// Remove the pointer to the initialize data
|
||||||
g_PADInitialize = NULL;
|
g_PADInitialize = NULL;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
DEBUG_QUIT();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef USE_RUMBLE_DINPUT_HACK
|
#ifdef USE_RUMBLE_DINPUT_HACK
|
||||||
FreeDirectInput();
|
FreeDirectInput();
|
||||||
|
|
Loading…
Reference in New Issue