Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixes for compiling with Visual C++ 8.0 Express Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 19, 2007
1 parent 8e44710 commit 4a3c0bb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
Binary file modified VisualC.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/SDL_compat.c
Expand Up @@ -243,7 +243,7 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event)
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:
Expand Down
2 changes: 1 addition & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -555,7 +555,7 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
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;
Expand Down
4 changes: 4 additions & 0 deletions src/audio/SDL_audiocvt.c
Expand Up @@ -1177,7 +1177,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
case 32:
{
/* !!! FIXME: need 32-bit converter here! */
#ifdef DEBUG_CONVERT
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
#endif
}
}
} else {
Expand Down Expand Up @@ -1214,7 +1216,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
case 32:
{
/* !!! FIXME: need 32-bit converter here! */
#ifdef DEBUG_CONVERT
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
#endif
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/audio/SDL_mixer.c
Expand Up @@ -303,8 +303,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
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--) {
Expand Down Expand Up @@ -332,8 +332,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
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--) {
Expand Down
1 change: 0 additions & 1 deletion src/video/SDL_renderer_sw.c
Expand Up @@ -347,7 +347,6 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
texture->driverdata = SDL_SW_CreateYUVTexture(texture);
} else {
SDL_Surface *surface;
int bpp;
Uint32 Rmask, Gmask, Bmask, Amask;

Expand Down
4 changes: 0 additions & 4 deletions src/video/SDL_video.c
Expand Up @@ -939,7 +939,6 @@ void
SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
{
SDL_Window *window = SDL_GetWindowFromID(windowID);
const char *last_title;

if (!window || title == window->title) {
return;
Expand Down Expand Up @@ -1852,7 +1851,6 @@ int
SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
{
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
SDL_Renderer *renderer;

if (!texture) {
return -1;
Expand Down Expand Up @@ -1886,7 +1884,6 @@ int
SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
{
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
SDL_Renderer *renderer;

if (!texture) {
return -1;
Expand Down Expand Up @@ -1920,7 +1917,6 @@ int
SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
{
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
SDL_Renderer *renderer;

if (!texture) {
return -1;
Expand Down
4 changes: 2 additions & 2 deletions src/video/win32/SDL_win32events.c
Expand Up @@ -590,12 +590,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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:
Expand Down

0 comments on commit 4a3c0bb

Please sign in to comment.