diff src/video/win32/SDL_win32video.h @ 1901:f1828a500391

Removed libc dependency on Windows again, to fix building with Visual C++ 2005 Express Edition. Fixed performance problem with testsprite2 on the D3D driver.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jul 2006 08:13:02 +0000
parents c121d94672cb
children 83420da906a5
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.h	Wed Jul 12 09:25:17 2006 +0000
+++ b/src/video/win32/SDL_win32video.h	Thu Jul 13 08:13:02 2006 +0000
@@ -32,7 +32,9 @@
 #include <windows.h>
 
 #if SDL_VIDEO_RENDER_D3D
-#include <d3d9.h>
+//#include <d3d9.h>
+#define D3D_DEBUG_INFO
+#include "d3d9.h"
 #endif
 
 #include "SDL_win32events.h"
@@ -43,10 +45,10 @@
 #include "SDL_win32window.h"
 
 #ifdef UNICODE
-#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (wcslen(S)+1)*sizeof(WCHAR))
+#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
 #else
-#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (strlen(S)+1))
+#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1))
 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
 #endif