Apparently it's possible that MSVC will want to call a built-in function to
authorRyan C. Gordon <icculus@icculus.org>
Wed, 29 Nov 2006 10:38:07 +0000
changeset 2078f932ac47a331
parent 2077 8bfba7ec379a
child 2079 1ed2155b7ee4
Apparently it's possible that MSVC will want to call a built-in function to
bitshift an Sint64, but it can't find this function since we don't use the
C runtime on Windows.

Division doesn't have this problem, though. Strange.

Thanks, Suzuki Masahiro.
src/audio/SDL_audiocvt.c
     1.1 --- a/src/audio/SDL_audiocvt.c	Wed Nov 29 10:34:05 2006 +0000
     1.2 +++ b/src/audio/SDL_audiocvt.c	Wed Nov 29 10:38:07 2006 +0000
     1.3 @@ -140,14 +140,14 @@
     1.4                      const Sint64 added =
     1.5                          (((Sint64) (Sint32) SDL_SwapBE32(src[0])) +
     1.6                           ((Sint64) (Sint32) SDL_SwapBE32(src[1])));
     1.7 -                    *(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added >> 1)));
     1.8 +                    *(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added / 2)));
     1.9                  }
    1.10              } else {
    1.11                  for (i = cvt->len_cvt / 8; i; --i, src += 2) {
    1.12                      const Sint64 added =
    1.13                          (((Sint64) (Sint32) SDL_SwapLE32(src[0])) +
    1.14                           ((Sint64) (Sint32) SDL_SwapLE32(src[1])));
    1.15 -                    *(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added >> 1)));
    1.16 +                    *(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added / 2)));
    1.17                  }
    1.18              }
    1.19          }