Skip to content

Skip innerclass imports - #130

Merged
Berstanio merged 5 commits into
libgdx:masterfrom
0880880:skip-innerclass-imports
Sep 13, 2026
Merged

Berstanio merged 5 commits into
libgdx:masterfrom
0880880:skip-innerclass-imports

Conversation

@0880880

@0880880 0880880 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Here is an example problematic struct:

typedef struct SDL_GamepadBinding
{
    SDL_GamepadBindingType input_type;
    union
    {
        int button;

        struct
        {
            int axis;
            int axis_min;
            int axis_max;
        } axis;

        struct
        {
            int hat;
            int hat_mask;
        } hat;

    } input;

    SDL_GamepadBindingType output_type;
    union
    {
        SDL_GamepadButton button;

        struct
        {
            SDL_GamepadAxis axis;
            int axis_min;
            int axis_max;
        } axis;

    } output;
} SDL_GamepadBinding;

jnigen imports

...SDL_GamepadBinding.input
...SDL_GamepadBinding.output
...SDL_GamepadBinding.input.axis
...SDL_GamepadBinding.input.hat
...SDL_GamepadBinding.output.axis

Here SDL_GamepadBinding.input.axis and SDL_GamepadBinding.output.axis collide and give an error

This fixes that by removing inner class importing and also changing instantiationType to give the name starting from the farthest parent

@Berstanio
Berstanio force-pushed the skip-innerclass-imports branch from b0d721e to 4146d9f Compare September 13, 2026 11:59
@Berstanio
Berstanio merged commit d56218a into libgdx:master Sep 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants