Skip to content

Commit a551fc6

Browse files
committed
Add Session.set_controller_port_device
1 parent b051f5c commit a551fc6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626

2727
- Add `SensorDriver.poll`.
2828
- Add `SessionBuilder.with_sensor`.
29+
- Add `Session.set_controller_port_device`.
2930

3031
### Fixed
3132

src/libretro/session.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,12 @@ def reset(self) -> None:
335335

336336
self._core.reset()
337337

338+
def set_controller_port_device(self, port: int, device: int) -> None:
339+
if self._is_exited or self._environment.is_shutdown:
340+
raise CoreShutDownException()
341+
342+
self._core.set_controller_port_device(port, device)
343+
338344

339345
__all__ = [
340346
"Session",

0 commit comments

Comments
 (0)