mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-13 11:39:09 +00: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:
parent
989c0f427f
commit
57f458fe9b
4 changed files with 218 additions and 106 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue