Skip to content

Commit

Permalink
USB: Implement trance vibrator and buzz savestate freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Jul 30, 2024
1 parent 02e0d2a commit acb0829
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pcsx2/USB/usb-pad/usb-buzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions pcsx2/USB/usb-pad/usb-buzz.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions pcsx2/USB/usb-pad/usb-trance-vibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions pcsx2/USB/usb-pad/usb-trance-vibrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit acb0829

Please sign in to comment.