Mercurial > sdl-ios-xcode
diff src/video/windx5/SDL_dx5events.c @ 1330:450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 06 Feb 2006 08:28:51 +0000 |
parents | c9b51268668f |
children | 3692456e7b0f |
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c Sat Feb 04 22:01:44 2006 +0000 +++ b/src/video/windx5/SDL_dx5events.c Mon Feb 06 08:28:51 2006 +0000 @@ -24,11 +24,12 @@ #include "directx.h" -#include <stdio.h> #include "SDL_events.h" #include "SDL_video.h" #include "SDL_error.h" #include "SDL_syswm.h" +#include "SDL_stdlib.h" +#include "SDL_string.h" #include "SDL_sysevents.h" #include "SDL_events_c.h" #include "SDL_lowvideo.h" @@ -111,12 +112,13 @@ error = "Device not initialized"; break; default: - sprintf(errbuf, "%s: Unknown DirectInput error: 0x%x", + snprintf(errbuf, SDL_arraysize(errbuf), + "%s: Unknown DirectInput error: 0x%x", function, code); break; } if ( ! errbuf[0] ) { - sprintf(errbuf, "%s: %s", function, error); + snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function, error); } SDL_SetError("%s", errbuf); return; @@ -610,7 +612,7 @@ timeout, QS_ALLEVENTS); if ((event >= WAIT_OBJECT_0) && (event < (WAIT_OBJECT_0+SDL_DIndev))) { DWORD numevents; - DIDEVICEOBJECTDATA evtbuf[INPUT_QSIZE]; + static DIDEVICEOBJECTDATA evtbuf[INPUT_QSIZE]; event -= WAIT_OBJECT_0; numevents = INPUT_QSIZE;