Skip to content

Commit 38dac77

Browse files
committed
libretro.h: warn that input polling must use base device IDs
The @param device line for retro_input_state_t documents only that the argument is masked with RETRO_DEVICE_MASK, which in isolation reads as a promise that subclass IDs are handled at the poll boundary. The masking is a frontend-side convenience (RetroArch strips the subclass bits; not all frontends do), and per the RETRO_DEVICE_SUBCLASS note, polling with a subclass ID is reserved for future definition. Add a @warning cross- referencing that reservation so core authors do not rely on the mask.
1 parent f51961d commit 38dac77

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libretro-common/include/libretro.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7716,6 +7716,9 @@ typedef void (RETRO_CALLCONV *retro_input_poll_t)(void);
77167716
*
77177717
* @param port Which player 'port' to query.
77187718
* @param device Which device to query for. Will be masked with \c RETRO_DEVICE_MASK.
7719+
* @warning Poll with a base device ID only; passing an ID created via
7720+
* \c RETRO_DEVICE_SUBCLASS is reserved for future definition, and the masking
7721+
* noted above is a frontend convenience that must not be relied upon.
77197722
* @param index The input index to retrieve.
77207723
* The exact semantics depend on the device type given in \c device.
77217724
* @param id The ID of which value to query, like \c RETRO_DEVICE_ID_JOYPAD_B.

0 commit comments

Comments
 (0)