comparison src/SDL_assert.c @ 5092:327f181542f1

Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c
author Sam Lantinga <slouken@libsdl.org>
date Mon, 24 Jan 2011 21:20:30 -0800
parents c2539ff054c8
children b530ef003506
comparison
equal deleted inserted replaced
5091:79bd1e289005 5092:327f181542f1
25 #include "SDL_assert.h" 25 #include "SDL_assert.h"
26 #include "SDL_assert_c.h" 26 #include "SDL_assert_c.h"
27 #include "video/SDL_sysvideo.h" 27 #include "video/SDL_sysvideo.h"
28 28
29 #ifdef __WIN32__ 29 #ifdef __WIN32__
30 #define WIN32_LEAN_AND_MEAN 30 #include "core/windows/SDL_windows.h"
31 #include <windows.h>
32 31
33 #ifndef WS_OVERLAPPEDWINDOW 32 #ifndef WS_OVERLAPPEDWINDOW
34 #define WS_OVERLAPPEDWINDOW 0 33 #define WS_OVERLAPPEDWINDOW 0
35 #endif
36
37 #ifdef UNICODE
38 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
39 #else
40 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
41 #endif 34 #endif
42 #else /* fprintf, _exit(), etc. */ 35 #else /* fprintf, _exit(), etc. */
43 #include <stdio.h> 36 #include <stdio.h>
44 #include <stdlib.h> 37 #include <stdlib.h>
45 #include <unistd.h> 38 #include <unistd.h>