From e1e88f499479b2a2eef88b36e7169486369854be Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 12 Jun 2009 08:41:48 +0000 Subject: [PATCH] Fixed some compile errors and warnings under Visual C++ --- src/video/SDL_video.c | 4 ++-- src/video/win32/SDL_win32video.h | 2 +- src/video/win32/SDL_win32window.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 9b4b3fec8..5e751ba64 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1630,7 +1630,7 @@ SDL_CreateTextureFromSurface(Uint32 format, SDL_Surface * surface) if (surface->format->Amask || !(surface->map->info.flags & (SDL_COPY_COLORKEY | SDL_COPY_MASK | SDL_COPY_BLEND))) { - int it; + Uint32 it; int pfmt; /* Pixel formats, sorted by best first */ @@ -1724,7 +1724,7 @@ SDL_CreateTextureFromSurface(Uint32 format, SDL_Surface * surface) } } else { /* Need a format with alpha */ - int it; + Uint32 it; int apfmt; /* Pixel formats with alpha, sorted by best first */ diff --git a/src/video/win32/SDL_win32video.h b/src/video/win32/SDL_win32video.h index 9454193c4..bbf4d74c0 100644 --- a/src/video/win32/SDL_win32video.h +++ b/src/video/win32/SDL_win32video.h @@ -87,7 +87,7 @@ typedef struct SDL_VideoData /* *INDENT-ON* */ int keyboard; - SDL_scancode *key_layout; + const SDL_scancode *key_layout; } SDL_VideoData; #endif /* _SDL_win32video_h */ diff --git a/src/video/win32/SDL_win32window.c b/src/video/win32/SDL_win32window.c index a8e40b49a..4c706b68e 100644 --- a/src/video/win32/SDL_win32window.c +++ b/src/video/win32/SDL_win32window.c @@ -642,6 +642,7 @@ SDL_HelperWindowCreate(void) { HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wce; + HWND hWndParent = NULL; /* Make sure window isn't created twice. */ if (SDL_HelperWindow != NULL) { @@ -662,7 +663,6 @@ SDL_HelperWindowCreate(void) return -1; } - HWND hWndParent = NULL; #ifndef _WIN32_WCE /* WinCE doesn't have HWND_MESSAGE */ hWndParent = HWND_MESSAGE;