]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix C++ typecast/linkage specification errors.
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jul 2013 22:04:34 +0000 (22:04 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jul 2013 22:04:34 +0000 (22:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11974 d7cf8633-e32d-0410-b094-e92efae38249

sys.h
vid_sdl.c

diff --git a/sys.h b/sys.h
index e5247d351afabe274f3e1a933b5915b89bc5b199..9dfdf620c91c9899d26a139272cdc038f86f1b58 100644 (file)
--- a/sys.h
+++ b/sys.h
@@ -83,6 +83,9 @@ void Sys_Quit (int returnvalue);
  * profiling to certain areas of the code, such as ingame performance without
  * regard for loading/shutdown performance (-profilegameonly on commandline)
  */
+#ifdef __cplusplus
+extern "C"
+#endif
 void Sys_AllowProfiling (qboolean enable);
 
 typedef struct sys_cleantime_s
index ab754107396f5b8852713f0dec0d53d5de6f7610..3211eaa17f55814a48b5dfdbdd9d800a5c6392a3 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -769,7 +769,7 @@ void VID_BuildJoyState(vid_joystate_t *joystate)
        if (skip != 11) \
                VID_TouchscreenArea( 0,   0,   0,   0,   0, NULL                         , 0.0f, NULL, NULL, &buttons[11], (keynum_t)'b', NULL, 0, 0, 0, false); \
        if (skip != 12) \
-               VID_TouchscreenArea( 0,   0,   0,   0,   0, NULL                         , 0.0f, NULL, NULL, &buttons[12], 'q', NULL, 0, 0, 0, false); \
+               VID_TouchscreenArea( 0,   0,   0,   0,   0, NULL                         , 0.0f, NULL, NULL, &buttons[12], (keynum_t)'q', NULL, 0, 0, 0, false); \
        if (skip != 13) \
                VID_TouchscreenArea( 0,   0,   0,   0,   0, NULL                         , 0.0f, NULL, NULL, &buttons[13], (keynum_t)'`', NULL, 0, 0, 0, false); \
        if (skip != 14) \
@@ -852,10 +852,10 @@ static void IN_Move_TouchScreen_SteelStorm(void)
                {
                        VID_TouchscreenCursor(0, 0, 0, 0, &buttons[0], K_MOUSE1);
 
-                       VID_TouchscreenArea( 2,16*xscale,-240*yscale, 224*xscale, 224*yscale, "gfx/gui/touch_l_thumb_dpad.tga", 0.0f, NULL, move, &buttons[1], 0, NULL, 0.15, 112*xscale, 112*yscale, false);
+                       VID_TouchscreenArea( 2,16*xscale,-240*yscale, 224*xscale, 224*yscale, "gfx/gui/touch_l_thumb_dpad.tga", 0.0f, NULL, move, &buttons[1], (keynum_t)0, NULL, 0.15, 112*xscale, 112*yscale, false);
 
-                       VID_TouchscreenArea( 3,-240*xscale,-160*yscale, 224*xscale, 128*yscale, "gfx/gui/touch_r_thumb_turn_n_shoot.tga"    , 0.0f, NULL, NULL,  0, 0, NULL, 0, 56*xscale, 0, false);
-                       VID_TouchscreenArea( 3,-240*xscale,-256*yscale, 224*xscale, 224*yscale, NULL    , 0.0f, NULL, aim,  &buttons[2], 0, NULL, 0.2, 56*xscale, 0, false);
+                       VID_TouchscreenArea( 3,-240*xscale,-160*yscale, 224*xscale, 128*yscale, "gfx/gui/touch_r_thumb_turn_n_shoot.tga"    , 0.0f, NULL, NULL,  0, (keynum_t)0, NULL, 0, 56*xscale, 0, false);
+                       VID_TouchscreenArea( 3,-240*xscale,-256*yscale, 224*xscale, 224*yscale, NULL    , 0.0f, NULL, aim,  &buttons[2], (keynum_t)0, NULL, 0.2, 56*xscale, 0, false);
 
                        VID_TouchscreenArea( 2, (vid_conwidth.value / 2) - 128,-80,  256,  80, NULL, 0.0f, NULL, NULL, &buttons[3], K_SHIFT, NULL, 0, 0, 0, true);
 
@@ -864,7 +864,7 @@ static void IN_Move_TouchScreen_SteelStorm(void)
 
                        VID_TouchscreenArea( 1,-100,   0, 100, 100, NULL                         , 0.0f, NULL, NULL, &buttons[10], (keynum_t)'m', NULL, 0, 0, 0, true);
                        VID_TouchscreenArea( 1,-100, 120, 100, 100, NULL                         , 0.0f, NULL, NULL, &buttons[11], (keynum_t)'b', NULL, 0, 0, 0, true);
-                       VID_TouchscreenArea( 0,   0,   0,  64,  64, NULL                         , 0.0f, NULL, NULL, &buttons[12], 'q', NULL, 0, 0, 0, true);
+                       VID_TouchscreenArea( 0,   0,   0,  64,  64, NULL                         , 0.0f, NULL, NULL, &buttons[12], (keynum_t)'q', NULL, 0, 0, 0, true);
                        if (developer.integer)
                                VID_TouchscreenArea( 0,   0,  96,  64,  64, NULL                         , 0.0f, NULL, NULL, &buttons[13], (keynum_t)'`', NULL, 0, 0, 0, true);
                        else