Updated GB_set_update_input_hint_callback (markdown)

Lior Halphon 2024-11-30 22:01:31 +02:00
parent 8370a02700
commit 5f1a47c078
1 changed files with 9 additions and 2 deletions

@ -4,14 +4,21 @@
typedef void (*GB_update_input_hint_callback_t)(GB_gameboy_t *gb);
```
<tt>void GB_set_update_input_hint_callback([[GB_gameboy_t]] *gb, [[GB_update_input_hint_callback_t]] callback);</tt>
<tt>void GB_set_update_input_hint_callback([[GB_gameboy_t]] *gb, GB_update_input_hint_callback_t callback);</tt>
In `joypad.h`
## Description
TBD
Set the input hint callback of an emulator instance. This optional callback is called when its "ideal" for a frontend to call [[GB_set_key_state]], etc. Frontends that use polling for user inputs can poll in this callback to minimize input lag.
## Thread Safety
If `callback` is not NULL, `GB_set_update_input_hint_callback` is thread-safe and can be called from any thread and context. Otherwise, it must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).
## See Also
* [[GB_set_key_state]]
* [[GB_set_key_mask]]
* [[GB_set_key_state_for_player]]
* [[GB_set_key_mask_for_player]]