USB: Implement trance vibrator and buzz savestate freezing

This commit is contained in:
Ty Lamontagne 2024-07-29 22:01:01 -04:00 committed by Ty
parent 02e0d2acde
commit acb0829d81
4 changed files with 12 additions and 0 deletions

View File

@ -198,6 +198,11 @@ namespace usb_pad
return "BuzzDevice";
}
bool BuzzDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
{
return true;
}
USBDevice* BuzzDevice::CreateDevice(SettingsInterface& si, u32 port, u32 subtype) const
{
BuzzState* s = new BuzzState(port);

View File

@ -84,6 +84,7 @@ namespace usb_pad
public:
const char* Name() const override;
const char* TypeName() const override;
bool Freeze(USBDevice* dev, StateWrapper& sw) const override;
float GetBindingValue(const USBDevice* dev, u32 bind_index) const override;
void SetBindingValue(USBDevice* dev, u32 bind_index, float value) const override;
std::span<const InputBindingInfo> Bindings(u32 subtype) const override;

View File

@ -129,6 +129,11 @@ namespace usb_pad
return "TranceVibrator";
}
bool TranceVibratorDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
{
return true;
}
USBDevice* TranceVibratorDevice::CreateDevice(SettingsInterface& si, u32 port, u32 subtype) const
{
TranceVibratorState* s = new TranceVibratorState(port);

View File

@ -26,6 +26,7 @@ namespace usb_pad
public:
const char* Name() const override;
const char* TypeName() const override;
bool Freeze(USBDevice* dev, StateWrapper& sw) const override;
float GetBindingValue(const USBDevice* dev, u32 bind_index) const override;
void SetBindingValue(USBDevice* dev, u32 bind_index, float value) const override;
std::span<const InputBindingInfo> Bindings(u32 subtype) const override;