Fixes for compiling with Visual C++ 8.0 Express Edition
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Jun 2007 05:53:56 +0000
changeset 21303ee59c43d784
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
     1.1 Binary file VisualC.zip has changed
     2.1 --- a/src/SDL_compat.c	Sat Jun 16 15:32:04 2007 +0000
     2.2 +++ b/src/SDL_compat.c	Tue Jun 19 05:53:56 2007 +0000
     2.3 @@ -243,7 +243,7 @@
     2.4      case SDL_TEXTINPUT:
     2.5          {
     2.6              /* FIXME: Generate an old style key repeat event if needed */
     2.7 -            printf("TEXTINPUT: '%s'\n", event->text.text);
     2.8 +            //printf("TEXTINPUT: '%s'\n", event->text.text);
     2.9              break;
    2.10          }
    2.11      case SDL_MOUSEWHEEL:
     3.1 --- a/src/audio/SDL_audio.c	Sat Jun 16 15:32:04 2007 +0000
     3.2 +++ b/src/audio/SDL_audio.c	Tue Jun 19 05:53:56 2007 +0000
     3.3 @@ -555,7 +555,7 @@
     3.4      switch (orig->channels) {
     3.5      case 0:{
     3.6              const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
     3.7 -            if ((!env) || ((prepared->channels = SDL_atoi(env)) == 0)) {
     3.8 +            if ((!env) || ((prepared->channels = (Uint8)SDL_atoi(env)) == 0)) {
     3.9                  prepared->channels = 2; /* a reasonable default */
    3.10              }
    3.11              break;
     4.1 --- a/src/audio/SDL_audiocvt.c	Sat Jun 16 15:32:04 2007 +0000
     4.2 +++ b/src/audio/SDL_audiocvt.c	Tue Jun 19 05:53:56 2007 +0000
     4.3 @@ -1177,7 +1177,9 @@
     4.4          case 32:
     4.5              {
     4.6                  /* !!! FIXME: need 32-bit converter here! */
     4.7 +#ifdef DEBUG_CONVERT
     4.8                  fprintf(stderr, "FIXME: need 32-bit converter here!\n");
     4.9 +#endif
    4.10              }
    4.11          }
    4.12      } else {
    4.13 @@ -1214,7 +1216,9 @@
    4.14          case 32:
    4.15              {
    4.16                  /* !!! FIXME: need 32-bit converter here! */
    4.17 +#ifdef DEBUG_CONVERT
    4.18                  fprintf(stderr, "FIXME: need 32-bit converter here!\n");
    4.19 +#endif
    4.20              }
    4.21          }
    4.22      }
     5.1 --- a/src/audio/SDL_mixer.c	Sat Jun 16 15:32:04 2007 +0000
     5.2 +++ b/src/audio/SDL_mixer.c	Tue Jun 19 05:53:56 2007 +0000
     5.3 @@ -303,8 +303,8 @@
     5.4              float src1, src2;
     5.5              double dst_sample;
     5.6              /* !!! FIXME: are these right? */
     5.7 -            const double max_audioval = 3.40282347e+38F;
     5.8 -            const double min_audioval = -3.40282347e+38F;
     5.9 +            const double max_audioval = 3.402823466e+38F;
    5.10 +            const double min_audioval = -3.402823466e+38F;
    5.11  
    5.12              len /= 4;
    5.13              while (len--) {
    5.14 @@ -332,8 +332,8 @@
    5.15              float src1, src2;
    5.16              double dst_sample;
    5.17              /* !!! FIXME: are these right? */
    5.18 -            const double max_audioval = 3.40282347e+38F;
    5.19 -            const double min_audioval = -3.40282347e+38F;
    5.20 +            const double max_audioval = 3.402823466e+38F;
    5.21 +            const double min_audioval = -3.402823466e+38F;
    5.22  
    5.23              len /= 4;
    5.24              while (len--) {
     6.1 --- a/src/video/SDL_renderer_sw.c	Sat Jun 16 15:32:04 2007 +0000
     6.2 +++ b/src/video/SDL_renderer_sw.c	Tue Jun 19 05:53:56 2007 +0000
     6.3 @@ -347,7 +347,6 @@
     6.4      if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
     6.5          texture->driverdata = SDL_SW_CreateYUVTexture(texture);
     6.6      } else {
     6.7 -        SDL_Surface *surface;
     6.8          int bpp;
     6.9          Uint32 Rmask, Gmask, Bmask, Amask;
    6.10  
     7.1 --- a/src/video/SDL_video.c	Sat Jun 16 15:32:04 2007 +0000
     7.2 +++ b/src/video/SDL_video.c	Tue Jun 19 05:53:56 2007 +0000
     7.3 @@ -939,7 +939,6 @@
     7.4  SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
     7.5  {
     7.6      SDL_Window *window = SDL_GetWindowFromID(windowID);
     7.7 -    const char *last_title;
     7.8  
     7.9      if (!window || title == window->title) {
    7.10          return;
    7.11 @@ -1852,7 +1851,6 @@
    7.12  SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
    7.13  {
    7.14      SDL_Texture *texture = SDL_GetTextureFromID(textureID);
    7.15 -    SDL_Renderer *renderer;
    7.16  
    7.17      if (!texture) {
    7.18          return -1;
    7.19 @@ -1886,7 +1884,6 @@
    7.20  SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
    7.21  {
    7.22      SDL_Texture *texture = SDL_GetTextureFromID(textureID);
    7.23 -    SDL_Renderer *renderer;
    7.24  
    7.25      if (!texture) {
    7.26          return -1;
    7.27 @@ -1920,7 +1917,6 @@
    7.28  SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
    7.29  {
    7.30      SDL_Texture *texture = SDL_GetTextureFromID(textureID);
    7.31 -    SDL_Renderer *renderer;
    7.32  
    7.33      if (!texture) {
    7.34          return -1;
     8.1 --- a/src/video/win32/SDL_win32events.c	Sat Jun 16 15:32:04 2007 +0000
     8.2 +++ b/src/video/win32/SDL_win32events.c	Tue Jun 19 05:53:56 2007 +0000
     8.3 @@ -590,12 +590,12 @@
     8.4                  break;
     8.5              case WM_XBUTTONDOWN:
     8.6                  xbuttonval = GET_XBUTTON_WPARAM(wParam);
     8.7 -                button = SDL_BUTTON_WHEELDOWN + xbuttonval;
     8.8 +                button = SDL_BUTTON_RIGHT + xbuttonval;
     8.9                  state = SDL_PRESSED;
    8.10                  break;
    8.11              case WM_XBUTTONUP:
    8.12                  xbuttonval = GET_XBUTTON_WPARAM(wParam);
    8.13 -                button = SDL_BUTTON_WHEELDOWN + xbuttonval;
    8.14 +                button = SDL_BUTTON_RIGHT + xbuttonval;
    8.15                  state = SDL_RELEASED;
    8.16                  break;
    8.17              default: