Releases: JesseTG/libretro.py
Releases · JesseTG/libretro.py
v0.7.1
Changed
- BREAKING:
SessionBuilder.with_micno longer accepts
a generator function that yields microphone samples.
Since the method accepts aCallablethat returns aMicrophoneDriver,
this complicated handling arguments.
Usewith_mic(GeneratorMicrophoneDriver(your_function))instead.
Fixed
- Change
libretro.api._utils.memoryview_at's type hints to match
those of Python 3.14'smemoryview_at,
and fix behavior to be similarly forgiving with its input. - Fix exceptions raised in the initializers for
retro_hw_render_callbackandretro_microphone_interface. - Fix
GeneratorMicrophone.readon Python 3.12,
asarray.clearwasn't added until Python 3.13.
v0.7.0
I'm still here! I've had many "I'll-get-around-to-it-someday" tasks
on my to-do list for libretro.py. Well, someday has come.
This release primarily addresses stability and API consistency;
the most notable change is full type coverage.
Added
- Type annotations to all public-facing types and functions in libretro.py.
Too many to list here, but the library has 100% coverage. - Type checking with Pyright to the CI pipeline.
All future pull requests must pass type-checking. - Additional symbols to
libretro.apito match [libretro.h][libretro.h] - The
libretro.ctypesmodule for type declarations
that describe the behavior documented by [ctypes][ctypes] - Added
PathDriver.file_browser_start_dir,
and implement it inExplicitPathDriverandTempDirPathDriver. - Added
libretro.typing, which contains types that enforcectypes's
documented rules statically while falling back to it at runtme. - Added linting pipelines to GitHub Actions for Python 3.12, 3.13, and 3.14.
All future pull requests must pass linting checks for these versions. - Added types for each VFS operation in
libretro.drivers.vfs.history. - Fields to
retro_vfs_file_handleandretro_vfs_dir_handle
that are helpful forFileSystemDriverimplementations. - Add
SessionBuilder.with_rumble. - Add
AnySessionas a type alias ofSessionwith
just the base driver protocols as its type parameters.
Fixed
- Fix a compatibility issue with Python 3.14 due to
FieldsFromTypeHints
relying on behavior that was changed since Python 3.12.
Changed
- BREAKING: Raise minimum required Python version to 3.12.
- BREAKING: Separate
RumbleDriverfromInputDriver. - BREAKING: Make
Sessiona subclass ofCompositeEnvironmentDriver. - BREAKING: Move all libretro callback struct creation
intoCompositeEnvironmentDriver. - BREAKING: Move compatibility shims into
libretro.compat. - BREAKING: Move memory-related constants (e.g.
RETRO_MEMORY_SAVE_RAM)
intolibretro.api.memory. - BREAKING: Change the values of some names in
SensorType. - BREAKING: Rename
MessageInterfacetoMessageDriver. - BREAKING: Rename
LoggerMessageInterfacetoLoggerMessageDriver. - BREAKING: Move
ConstantPowerDriverintolibretro.drivers.power.constant. - BREAKING: Remove validation logic from
SensorDriver. - BREAKING: Rename
FileSystemInterfacetoFileSystemDriver. - BREAKING: Rename
StandardFileSystemInterfacetoDefaultFileSystemDriver. - BREAKING: Rename
HistoryFileSystemInterfacetoHistoryFileSystemDriver. - Refactor
FileSystemInterfaceto primarily expose its VFS methods on itself,
rather than throughFileHandleorDirectoryHandle
(although they're still available). - Make
justfilerecipes operate in the current environment
instead of forcibly creating a virtual environment. - Add type parameters to
CompositeEnvironmentDriverfor each driver
so that test script authors don't have to check classes
before accessing installed drivers. - Catch exceptions raised in
EnvironmentDriver's callbacks
(including those returned to the core),
and allow subclasses to handle those exceptions
once control returns from the core. Sessionre-raises exceptions that occur during callbacks
once control returns from the core.- Change all uses of
c_void_ptoc_void_ptr,
to avoid implicit conversions toint. - Allow
TempDirPathDriverto ignore exceptions that are raised
while deleting the temporary directories. - Update required
moderngl-windowversion for theopenglextra to3.*. - Redefine all function pointer types to use
TypedFunctionPointer,
and their arguments to use various helper types likeCIntArg. PointerState.pointersis now atupleinstead of aSequence.- Allow
CoreInterfaceandCore'sset_...methods to accept
PythonCallables as well as corresponding function pointers.
Deprecated
- Deprecate
SessionBuilderin favor of creatingSessiondirectly.
Removed
- BREAKING: Remove
GeneratorLocationDriver. - BREAKING: Remove
retro_log_callback.__call__.
It served no purpose as a helper method,
since the callback is meant for cores. - Removed
flake8from the repo's linters. - Removed the
_type_field from allIntEnumsubclasses.
v0.6.0
v0.5.0
Thanks to @JSensebe for his contributions!
Changed
- BREAKING: Rename
SensorInterfacetoSensorDriver. - BREAKING: Rename
GeneratorSensorInterfacetoIterableSensorDriver
and some accompanying type aliases. - BREAKING: Decouple
SensorDriverandInputDriverso that
the former is no longer part of the latter. - Use
InputDriver.max_usersto filter sensor input
regardless of the underlying sensor driver.
Added
- Add
SensorDriver.poll. - Add
SessionBuilder.with_sensor. - Add
Session.set_controller_port_device.
Fixed
- Improved documentation for
IterableSensorDriver. - Fix a
GET_VARIABLEdereference error.
v0.4.0
Changed
- BREAKING: Rename
RumbleInterfacetoRumbleDriver. - BREAKING: Rename
DefaultRumbleDrivertoDictRumbleDriver. - BREAKING: Rename
GeneratorInputDrivertoIterableInputDriver.
Fixed
- Fix the rumble driver raising an exception when setting the rumble state.
v0.3.1
v0.3.0
Added
- Add
TempDirPathDriver. - Added various runnable scripts for test purposes.
- Add a new guide for taking a capture with RenderDoc.
- Add labels to OpenGL objects created by
ModernGlVideoDriver. - Add debug groups to important methods within
ModernGlVideoDriver.
Changed
- BREAKING: Rename
DefaultPathDrivertoExplicitPathDriver. - Make
TempDirPathDriverthe default path driver used bySessionBuilder.
Fixed
- Improved documentation for parts of
SessionBuilderandVideoDriver - Removed a
glClearcall inModernGlVideoDriverthat was left in by accident. - Clear the
glGetErrorqueue at various places inModernGlVideoDriver
to prevent PyOpenGL from misreporting errors that came from moderngl or the loaded core.
Removed
- BREAKING: Remove
VideoDriverInitArgs.
v0.2.0
Thanks to @JSensebe for his contributions!
Added
- Add
Language.GALICIANandLanguage.NORWEGIAN
to correspond with additions tolibretro.h. - Add a live documentation website here.
(#11) - Allow
ArrayVideoDriver.screenshot()to rotate the returned frame
(#3) - Add 16-bit pixel format support to
ArrayVideoDriver.screenshot().
(#5)
Changed
- BREAKING: Rename
KeyboardState.return_toKeyboardState.return_key - BREAKING: Rename
KeyboardState.break_toKeyboardState.break_key
Fixed
- Fix
Core.unserializebeing unable to acceptbytesobjects.
(#4) - Fix an exception when a core sets its geometry before its initial AV info is fetched.
(#6) - Fix a crash when a core uses
retro_led_interface.
(#7) - Fix an exception when passing a frame pitch inconsistent with the configured video format.
(#8)