mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
GCAdapter: Add a background thread to detect the adapter
This scanning thread either polls libusb or checks every 500ms for a change depending on host capabilities. The GC Adapter can now be plugged and unplugged at any time when dolphin is open, it will be used if the direct connect option is set.
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/SI_GCAdapter.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
|
||||
class InputConfig;
|
||||
@ -19,6 +20,7 @@ class ControllerConfigDiag : public wxDialog
|
||||
{
|
||||
public:
|
||||
ControllerConfigDiag(wxWindow* const parent);
|
||||
~ControllerConfigDiag();
|
||||
|
||||
private:
|
||||
void RefreshRealWiimotes(wxCommandEvent& event);
|
||||
@ -82,6 +84,8 @@ private:
|
||||
void Cancel(wxCommandEvent& event);
|
||||
void OnGameCubePortChanged(wxCommandEvent& event);
|
||||
void OnGameCubeConfigButton(wxCommandEvent& event);
|
||||
void ScheduleAdapterUpdate();
|
||||
void UpdateAdapter(wxCommandEvent& ev);
|
||||
|
||||
std::map<wxWindowID, unsigned int> m_gc_port_choice_ids;
|
||||
std::map<wxWindowID, unsigned int> m_gc_port_config_ids;
|
||||
@ -90,6 +94,7 @@ private:
|
||||
std::map<wxWindowID, unsigned int> m_wiimote_index_from_ctrl_id;
|
||||
unsigned int m_orig_wiimote_sources[MAX_BBMOTES];
|
||||
|
||||
wxStaticText* m_adapter_status;
|
||||
wxButton* wiimote_configure_bt[MAX_WIIMOTES];
|
||||
wxButton* gamecube_configure_bt[4];
|
||||
std::map<wxWindowID, unsigned int> m_wiimote_index_from_conf_bt_id;
|
||||
|
Reference in New Issue
Block a user