MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / ControllerButtonName

Function ControllerButtonName

deps/SDL2/src/test/SDL_test_common.c:1201–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201static const char *
1202ControllerButtonName(const SDL_GameControllerButton button)
1203{
1204 switch (button)
1205 {
1206#define BUTTON_CASE(btn) case SDL_CONTROLLER_BUTTON_##btn: return #btn
1207 BUTTON_CASE(INVALID);
1208 BUTTON_CASE(A);
1209 BUTTON_CASE(B);
1210 BUTTON_CASE(X);
1211 BUTTON_CASE(Y);
1212 BUTTON_CASE(BACK);
1213 BUTTON_CASE(GUIDE);
1214 BUTTON_CASE(START);
1215 BUTTON_CASE(LEFTSTICK);
1216 BUTTON_CASE(RIGHTSTICK);
1217 BUTTON_CASE(LEFTSHOULDER);
1218 BUTTON_CASE(RIGHTSHOULDER);
1219 BUTTON_CASE(DPAD_UP);
1220 BUTTON_CASE(DPAD_DOWN);
1221 BUTTON_CASE(DPAD_LEFT);
1222 BUTTON_CASE(DPAD_RIGHT);
1223#undef BUTTON_CASE
1224default: return "???";
1225 }
1226}
1227
1228static void
1229SDLTest_PrintEvent(SDL_Event * event)

Callers 1

SDLTest_PrintEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected