Skip to content

Commit b49cf56

Browse files
committed
Fix the rumble driver raising an exception when setting the rumble state
1 parent 709a482 commit b49cf56

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- **BREAKING:** Rename `DefaultRumbleDriver` to `DictRumbleDriver`.
1919
- **BREAKING:** Rename `GeneratorInputDriver` to `IterableInputDriver`.
2020

21+
### Fixed
22+
23+
- Fix the rumble driver raising an exception when setting the rumble state.
24+
2125
## [0.3.1] - 2024-10-17
2226

2327
### Changed

src/libretro/drivers/environment/composite.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,15 @@ def _get_rumble_interface(self, rumble_ptr: POINTER(retro_rumble_interface)) ->
617617
return False
618618

619619
if not self._rumble:
620-
self._rumble = retro_rumble_interface(self.__set_rumble_state)
620+
self._rumble = retro_rumble_interface(
621+
retro_set_rumble_state_t(self.__set_rumble_state)
622+
)
621623
# So that even if the rumble/input drivers are swapped out,
622624
# the core still has valid function pointers tied to non-GC'd callable objects
623625

624626
rumble_ptr[0] = self._rumble
625627
return True
626628

627-
@retro_set_rumble_state_t
628629
def __set_rumble_state(self, port: int, effect: int, strength: int) -> bool:
629630
if not self._input.rumble:
630631
return False

0 commit comments

Comments
 (0)