interface.cpp reads four numbers from joystick.ini. These correspond on your joystick / joypad / gamepad to the GLFW axes you want to use as Apple ][ joystick X and Y axes and the GLFW buttons you want to use for Apple ][ left and right button. apple2e uses the GLFW windowing and event library for joystick input, and there may be no obvious mapping from the thumbstick and buttons on your gamepad to GLFW axis and button numbers.
Here's an example that I use for my Samsung EI-GP20:
3 4 1 3
That means that I'm using whatever GLFW thinks are axes 3 and 4 and buttons 1 and 3 for my Apple paddle and button inputs.
I don't have a good configuration process for getting these numbers. The only thing I have so far is to have interface.cpp print out the active axes and buttons as you move your joystick and press buttons. To do this, set the environment variable PROBE_JOYSTICKS. When apple2e starts up, move your thumbstick in X (to the left and right). With my gamepad, I something like the following:
That means that I use axis "3" for my Apple ][ joystick X (paddle 0). You may see a different number Move the thumbstick in Y (up and down) to get the Y axis. I see something like: