doxygen: wrap some game controller code examples in "```c" blocks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h
index 2248fb7..15134ba 100644
--- a/include/SDL_gamecontroller.h
+++ b/include/SDL_gamecontroller.h
@@ -99,6 +99,8 @@ typedef struct SDL_GameControllerButtonBind
/**
* To count the number of game controllers in the system for the following:
+ *
+ * ```c
* int nJoysticks = SDL_NumJoysticks();
* int nGameControllers = 0;
* for (int i = 0; i < nJoysticks; i++) {
@@ -106,6 +108,7 @@ typedef struct SDL_GameControllerButtonBind
* nGameControllers++;
* }
* }
+ * ```
*
* Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
@@ -119,8 +122,10 @@ typedef struct SDL_GameControllerButtonBind
* Buttons can be used as a controller axis and vice versa.
*
* This string shows an example of a valid mapping for a controller
- * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
*
+ * ```c
+ * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
+ * ```
*/
/**
@@ -174,7 +179,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
*
* This string shows an example of a valid mapping for a controller:
*
- * ```
+ * ```c
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
* ```
*