RobLoach / RobLoach/nuklear_gamepad

Add backend capability query function

Open
#67 0 comments 0 reactions 1 assignee View on GitHub

@RobLoach is already working on this.

Since Sep 16, 2026.

enhancement
Dominant language
C
Stars
9
Forks
3
Avg merge
4h 32m
Merged PRs (30d)
1

Description

Users can't discover at runtime which features their backend supports.
For example, pntr has no axes, raylib has no L2/R2 digital, only SDL3
provides per-controller button names. The only way to find out is trial
and error or reading the source.

Suggested Implementation

Add nk_gamepad_input_source_supports() or a capabilities bitmask in
struct nk_gamepad_input_source:

  • NK_GAMEPAD_CAP_AXES
  • NK_GAMEPAD_CAP_HOTPLUG
  • NK_GAMEPAD_CAP_BUTTON_NAMES
  • NK_GAMEPAD_CAP_RUMBLE (future)

Each backend sets its capabilities during init.

QA

  • nk_gamepad_input_source_supports(gp, NK_GAMEPAD_CAP_AXES) returns false for pntr
  • returns true for SDL/SDL3/GLFW/raylib

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.