Commit c2b90f2df833ca08ab9746ff812dbd1da711bb4d

Philipp Wiesemann 2016-12-28T20:11:29

Fixed compiling of testgamecontroller program with C++.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 117e280..1fa29d6 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -109,11 +109,11 @@ loop(void *arg)
     while (SDL_PollEvent(&event)) {
         switch (event.type) {
         case SDL_CONTROLLERAXISMOTION:
-            SDL_Log("Controller axis %s changed to %d\n", SDL_GameControllerGetStringForAxis(event.caxis.axis), event.caxis.value);
+            SDL_Log("Controller axis %s changed to %d\n", SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis)event.caxis.axis), event.caxis.value);
             break;
         case SDL_CONTROLLERBUTTONDOWN:
         case SDL_CONTROLLERBUTTONUP:
-            SDL_Log("Controller button %s %s\n", SDL_GameControllerGetStringForButton(event.cbutton.button), event.cbutton.state ? "pressed" : "released");
+            SDL_Log("Controller button %s %s\n", SDL_GameControllerGetStringForButton((SDL_GameControllerButton)event.cbutton.button), event.cbutton.state ? "pressed" : "released");
             break;
         case SDL_KEYDOWN:
             if (event.key.keysym.sym != SDLK_ESCAPE) {