mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Gamepads (minor change) > Fixed it so it doesn't always check for new pads on startup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4543 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7f66fe1ef6
commit
18450737be
@ -253,8 +253,10 @@ void ConsoleListener::PixelSpace(int Left, int Top, int Width, int Height, bool
|
||||
|
||||
void ConsoleListener::CustomLog(const char *Text)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DWORD cCharsWritten;
|
||||
WriteConsole(hConsole, Text, (DWORD)strlen(Text), &cCharsWritten, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text)
|
||||
|
@ -692,8 +692,11 @@ void WiimotePadConfigDialog::Update(wxTimerEvent& WXUNUSED(event))
|
||||
{
|
||||
if (!LiveUpdates) return;
|
||||
|
||||
// Don't run this the first time
|
||||
int OldNumDIDevices;
|
||||
if (WiiMoteEmu::NumDIDevices == -1) OldNumDIDevices = InputCommon::SearchDIDevices();
|
||||
// Search for connected devices and update dialog
|
||||
int OldNumDIDevices = WiiMoteEmu::NumDIDevices;
|
||||
OldNumDIDevices = WiiMoteEmu::NumDIDevices;
|
||||
WiiMoteEmu::NumDIDevices = InputCommon::SearchDIDevices();
|
||||
|
||||
// Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id
|
||||
|
@ -57,7 +57,7 @@ wiimote_key g_ExtKey; // The extension encryption key
|
||||
bool g_Encryption; // Encryption on or off
|
||||
|
||||
// Gamepad input
|
||||
int NumPads = 0, NumDIDevices = 0; // Number of pads
|
||||
int NumPads = 0, NumDIDevices = -1; // Number of pads
|
||||
bool SDLPolling = true;
|
||||
std::vector<InputCommon::CONTROLLER_INFO> joyinfo;
|
||||
InputCommon::CONTROLLER_STATE_NEW PadState[4];
|
||||
|
@ -173,8 +173,11 @@ void PADConfigDialognJoy::UpdateSlow()
|
||||
{
|
||||
if (!LiveUpdates) return;
|
||||
|
||||
// Don't run this the first time
|
||||
int OldNumDIDevices;
|
||||
if (NumDIDevices == -1) OldNumDIDevices = InputCommon::SearchDIDevices();
|
||||
// Search for connected devices and update dialog
|
||||
int OldNumDIDevices = NumDIDevices;
|
||||
OldNumDIDevices = NumDIDevices;
|
||||
NumDIDevices = InputCommon::SearchDIDevices();
|
||||
|
||||
// Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id
|
||||
|
@ -49,7 +49,7 @@ InputCommon::CONTROLLER_STATE PadState[4];
|
||||
InputCommon::CONTROLLER_MAPPING PadMapping[4];
|
||||
bool g_EmulatorRunning = false;
|
||||
bool SDLPolling = true;
|
||||
int NumPads = 0, NumDIDevices = 0, LastPad = 0;
|
||||
int NumPads = 0, NumDIDevices = -1, LastPad = 0;
|
||||
#ifdef _WIN32
|
||||
HWND m_hWnd = NULL, m_hConsole = NULL; // Handle to window
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user