Fixes for compiling with Visual C++ 8.0 Express Edition
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Jun 2007 05:53:56 +0000
changeset 2130 3ee59c43d784
parent 2129 047245361002
child 2131 55c7932d1fdb
Fixes for compiling with Visual C++ 8.0 Express Edition
VisualC.zip
src/SDL_compat.c
src/audio/SDL_audio.c
src/audio/SDL_audiocvt.c
src/audio/SDL_mixer.c
src/video/SDL_renderer_sw.c
src/video/SDL_video.c
src/video/win32/SDL_win32events.c
Binary file VisualC.zip has changed
--- a/src/SDL_compat.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/SDL_compat.c	Tue Jun 19 05:53:56 2007 +0000
@@ -243,7 +243,7 @@
     case SDL_TEXTINPUT:
         {
             /* FIXME: Generate an old style key repeat event if needed */
-            printf("TEXTINPUT: '%s'\n", event->text.text);
+            //printf("TEXTINPUT: '%s'\n", event->text.text);
             break;
         }
     case SDL_MOUSEWHEEL:
--- a/src/audio/SDL_audio.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/audio/SDL_audio.c	Tue Jun 19 05:53:56 2007 +0000
@@ -555,7 +555,7 @@
     switch (orig->channels) {
     case 0:{
             const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
-            if ((!env) || ((prepared->channels = SDL_atoi(env)) == 0)) {
+            if ((!env) || ((prepared->channels = (Uint8)SDL_atoi(env)) == 0)) {
                 prepared->channels = 2; /* a reasonable default */
             }
             break;
--- a/src/audio/SDL_audiocvt.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/audio/SDL_audiocvt.c	Tue Jun 19 05:53:56 2007 +0000
@@ -1177,7 +1177,9 @@
         case 32:
             {
                 /* !!! FIXME: need 32-bit converter here! */
+#ifdef DEBUG_CONVERT
                 fprintf(stderr, "FIXME: need 32-bit converter here!\n");
+#endif
             }
         }
     } else {
@@ -1214,7 +1216,9 @@
         case 32:
             {
                 /* !!! FIXME: need 32-bit converter here! */
+#ifdef DEBUG_CONVERT
                 fprintf(stderr, "FIXME: need 32-bit converter here!\n");
+#endif
             }
         }
     }
--- a/src/audio/SDL_mixer.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/audio/SDL_mixer.c	Tue Jun 19 05:53:56 2007 +0000
@@ -303,8 +303,8 @@
             float src1, src2;
             double dst_sample;
             /* !!! FIXME: are these right? */
-            const double max_audioval = 3.40282347e+38F;
-            const double min_audioval = -3.40282347e+38F;
+            const double max_audioval = 3.402823466e+38F;
+            const double min_audioval = -3.402823466e+38F;
 
             len /= 4;
             while (len--) {
@@ -332,8 +332,8 @@
             float src1, src2;
             double dst_sample;
             /* !!! FIXME: are these right? */
-            const double max_audioval = 3.40282347e+38F;
-            const double min_audioval = -3.40282347e+38F;
+            const double max_audioval = 3.402823466e+38F;
+            const double min_audioval = -3.402823466e+38F;
 
             len /= 4;
             while (len--) {
--- a/src/video/SDL_renderer_sw.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/video/SDL_renderer_sw.c	Tue Jun 19 05:53:56 2007 +0000
@@ -347,7 +347,6 @@
     if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
         texture->driverdata = SDL_SW_CreateYUVTexture(texture);
     } else {
-        SDL_Surface *surface;
         int bpp;
         Uint32 Rmask, Gmask, Bmask, Amask;
 
--- a/src/video/SDL_video.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/video/SDL_video.c	Tue Jun 19 05:53:56 2007 +0000
@@ -939,7 +939,6 @@
 SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
 {
     SDL_Window *window = SDL_GetWindowFromID(windowID);
-    const char *last_title;
 
     if (!window || title == window->title) {
         return;
@@ -1852,7 +1851,6 @@
 SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
 {
     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
-    SDL_Renderer *renderer;
 
     if (!texture) {
         return -1;
@@ -1886,7 +1884,6 @@
 SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
 {
     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
-    SDL_Renderer *renderer;
 
     if (!texture) {
         return -1;
@@ -1920,7 +1917,6 @@
 SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
 {
     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
-    SDL_Renderer *renderer;
 
     if (!texture) {
         return -1;
--- a/src/video/win32/SDL_win32events.c	Sat Jun 16 15:32:04 2007 +0000
+++ b/src/video/win32/SDL_win32events.c	Tue Jun 19 05:53:56 2007 +0000
@@ -590,12 +590,12 @@
                 break;
             case WM_XBUTTONDOWN:
                 xbuttonval = GET_XBUTTON_WPARAM(wParam);
-                button = SDL_BUTTON_WHEELDOWN + xbuttonval;
+                button = SDL_BUTTON_RIGHT + xbuttonval;
                 state = SDL_PRESSED;
                 break;
             case WM_XBUTTONUP:
                 xbuttonval = GET_XBUTTON_WPARAM(wParam);
-                button = SDL_BUTTON_WHEELDOWN + xbuttonval;
+                button = SDL_BUTTON_RIGHT + xbuttonval;
                 state = SDL_RELEASED;
                 break;
             default: