mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Add USB passthrough setting and USBUtils
This adds a USB passthrough setting to ConfigManager and everything needed for the UI to show and manage the whitelist properly.
This commit is contained in:
@ -5,7 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <limits>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/IniFile.h"
|
||||
@ -151,6 +153,10 @@ struct SConfig : NonCopyable
|
||||
int m_bt_passthrough_vid = -1;
|
||||
std::string m_bt_passthrough_link_keys;
|
||||
|
||||
// USB passthrough settings
|
||||
std::set<std::pair<u16, u16>> m_usb_passthrough_devices;
|
||||
bool IsUSBDeviceWhitelisted(std::pair<u16, u16> vid_pid) const;
|
||||
|
||||
// SYSCONF settings
|
||||
int m_sensor_bar_position = 0x01;
|
||||
int m_sensor_bar_sensitivity = 0x03;
|
||||
@ -350,6 +356,7 @@ private:
|
||||
void SaveNetworkSettings(IniFile& ini);
|
||||
void SaveAnalyticsSettings(IniFile& ini);
|
||||
void SaveBluetoothPassthroughSettings(IniFile& ini);
|
||||
void SaveUSBPassthroughSettings(IniFile& ini);
|
||||
void SaveSysconfSettings(IniFile& ini);
|
||||
|
||||
void LoadGeneralSettings(IniFile& ini);
|
||||
@ -364,6 +371,7 @@ private:
|
||||
void LoadNetworkSettings(IniFile& ini);
|
||||
void LoadAnalyticsSettings(IniFile& ini);
|
||||
void LoadBluetoothPassthroughSettings(IniFile& ini);
|
||||
void LoadUSBPassthroughSettings(IniFile& ini);
|
||||
void LoadSysconfSettings(IniFile& ini);
|
||||
|
||||
bool SetRegion(DiscIO::Region region, std::string* directory_name);
|
||||
|
Reference in New Issue
Block a user