changeset 1423:4ed717f9e509

Updated for Visual Studio Express 2005
author Sam Lantinga <slouken@libsdl.org>
date Fri, 24 Feb 2006 08:17:28 +0000
parents d2ee8da60262
children 7a610f25c12f
files VisualC.zip include/SDL.h include/SDL_config_amiga.h include/SDL_config_dreamcast.h include/SDL_config_macos.h include/SDL_config_macosx.h include/SDL_config_win32.h include/SDL_endian.h include/SDL_windows.h src/main/win32/SDL_win32_main.c
diffstat 10 files changed, 22 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
Binary file VisualC.zip has changed
--- a/include/SDL.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL.h	Fri Feb 24 08:17:28 2006 +0000
@@ -25,6 +25,7 @@
 #ifndef _SDL_H
 #define _SDL_H
 
+#include "SDL_main.h"
 #include "SDL_stdinc.h"
 #include "SDL_audio.h"
 #include "SDL_cdrom.h"
--- a/include/SDL_config_amiga.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_config_amiga.h	Fri Feb 24 08:17:28 2006 +0000
@@ -50,7 +50,6 @@
 
 /* Enable various audio drivers */
 #define SDL_AUDIO_DRIVER_AHI	1
-#define SDL_AUDIO_DRIVER_DISK	1
 
 /* Enable various cdrom drivers */
 #define SDL_CDROM_DUMMY	1
@@ -69,7 +68,6 @@
 
 /* Enable various video drivers */
 #define SDL_VIDEO_DRIVER_CYBERGRAPHICS	1
-#define SDL_VIDEO_DRIVER_DUMMY	1
 
 /* Enable OpenGL support */
 #define SDL_VIDEO_OPENGL	1
--- a/include/SDL_config_dreamcast.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_config_dreamcast.h	Fri Feb 24 08:17:28 2006 +0000
@@ -52,7 +52,6 @@
 
 /* Enable various audio drivers */
 #define SDL_AUDIO_DRIVER_DC	1
-#define SDL_AUDIO_DRIVER_DISK	1
 
 /* Enable various cdrom drivers */
 #define SDL_CDROM_DC	1
@@ -71,6 +70,5 @@
 
 /* Enable various video drivers */
 #define SDL_VIDEO_DRIVER_DC	1
-#define SDL_VIDEO_DRIVER_DUMMY	1
 
 #endif /* _SDL_config_dreamcast_h */
--- a/include/SDL_config_macos.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_config_macos.h	Fri Feb 24 08:17:28 2006 +0000
@@ -51,7 +51,6 @@
 #define HAVE_MEMCMP	1
 
 /* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_DISK	1
 #define SDL_AUDIO_DRIVER_SNDMGR	1
 
 /* Enable various cdrom drivers */
@@ -71,7 +70,6 @@
 
 /* Enable various video drivers */
 #define SDL_VIDEO_DRIVER_DRAWSPROCKET	1
-#define SDL_VIDEO_DRIVER_DUMMY	1
 #define SDL_VIDEO_DRIVER_TOOLBOX	1
 
 /* Enable OpenGL support */
--- a/include/SDL_config_macosx.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_config_macosx.h	Fri Feb 24 08:17:28 2006 +0000
@@ -52,7 +52,6 @@
 
 /* Enable various audio drivers */
 #define SDL_AUDIO_DRIVER_COREAUDIO	1
-#define SDL_AUDIO_DRIVER_DISK	1
 #define SDL_AUDIO_DRIVER_SNDMGR	1
 
 /* Enable various cdrom drivers */
--- a/include/SDL_config_win32.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_config_win32.h	Fri Feb 24 08:17:28 2006 +0000
@@ -25,15 +25,23 @@
 
 /* This is a set of defines to configure the SDL features */
 
+#ifdef _MSC_VER
+typedef __int8			int8_t;
+typedef unsigned __int8		uint8_t;
+typedef __int16			int16_t;
+typedef unsigned __int16	uint16_t;
+typedef __int32			int32_t;
+typedef unsigned __int32	uint32_t;
+typedef __int64			int64_t;
+typedef unsigned __int64	uint64_t;
+#endif
 #define SDL_HAS_64BIT_TYPE	1
 
 /* Useful headers */
 #define HAVE_STDARG_H	1
 #define HAVE_STDDEF_H	1
-#define HAVE_INTTYPES_H	1
 
 /* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_DISK	1
 #ifndef _WIN32_WCE
 #define SDL_AUDIO_DRIVER_DSOUND	1
 #endif
@@ -62,7 +70,6 @@
 #ifndef _WIN32_WCE
 #define SDL_VIDEO_DRIVER_DDRAW	1
 #endif
-#define SDL_VIDEO_DRIVER_DUMMY	1
 #ifdef _WIN32_WCE
 #define SDL_VIDEO_DRIVER_GAPI	1
 #endif
--- a/include/SDL_endian.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_endian.h	Fri Feb 24 08:17:28 2006 +0000
@@ -33,6 +33,7 @@
 
 #ifndef SDL_BYTEORDER	/* Not defined in SDL_config.h? */
 #if (defined(__i386__) || defined(__i386)) || \
+     defined(_M_IX86) || \
      defined(__ia64__) || defined(__x86_64__) || \
     (defined(__alpha__) || defined(__alpha)) || \
     (defined(__arm__) || defined(__thumb__)) || \
--- a/include/SDL_windows.h	Fri Feb 24 07:26:31 2006 +0000
+++ b/include/SDL_windows.h	Fri Feb 24 08:17:28 2006 +0000
@@ -37,9 +37,6 @@
 	   __declspec(selectany) int _fltused=1;
 #endif
 #endif /* _MSC_VER */
-#define _INC_STDLIB
-#define _INC_STRING
-#define __STRALIGN_H_
 #endif/* !HAVE_LIBC */
 #include <windows.h>
 
--- a/src/main/win32/SDL_win32_main.c	Fri Feb 24 07:26:31 2006 +0000
+++ b/src/main/win32/SDL_win32_main.c	Fri Feb 24 08:17:28 2006 +0000
@@ -188,6 +188,7 @@
 {
 	int n;
 	char *bufp, *appname;
+	int status;
 
 	/* Get the class name from argv[0] */
 	appname = argv[0];
@@ -203,7 +204,7 @@
 	else
 		n = (bufp-appname);
 
-	bufp = (char *)alloca(n+1);
+	bufp = SDL_stack_alloc(char, n+1);
 	if ( bufp == NULL ) {
 		return OutOfMemory();
 	}
@@ -226,13 +227,13 @@
 	SDL_SetModuleHandle(GetModuleHandle(NULL));
 
 	/* Run the application main() code */
-	SDL_main(argc, argv);
+	status = SDL_main(argc, argv);
 
 	/* Exit cleanly, calling atexit() functions */
-	exit(0);
+	exit(status);
 
 	/* Hush little compiler, don't you cry... */
-	return(0);
+	return 0;
 }
 
 /* This is where execution begins [windowed apps] */
@@ -262,7 +263,6 @@
 #ifndef NO_STDIO_REDIRECT
 	FILE *newfp;
 #endif
-	int retval;
 
 	/* Start up DDHELP.EXE before opening any files, so DDHELP doesn't
 	   keep them open.  This is a hack.. hopefully it will be fixed 
@@ -322,7 +322,7 @@
 
 #ifdef _WIN32_WCE
 	nLen = wcslen(szCmdLine)+128+1;
-	bufp = (wchar_t *)alloca(nLen*2);
+	bufp = SDL_stack_alloc(wchar_t, nLen*2);
 	wcscpy (bufp, TEXT("\""));
 	GetModuleFileName(NULL, bufp+1, 128-3);
 	wcscpy (bufp+wcslen(bufp), TEXT("\" "));
@@ -334,7 +334,7 @@
 	}
 	WideCharToMultiByte(CP_ACP, 0, bufp, -1, cmdline, nLen, NULL, NULL);
 #else
-	/* Grab the command line (use alloca() on Windows) */
+	/* Grab the command line */
 	bufp = GetCommandLine();
 	nLen = SDL_strlen(bufp)+1;
 	cmdline = SDL_stack_alloc(char, nLen);
@@ -353,9 +353,8 @@
 	ParseCommandLine(cmdline, argv);
 
 	/* Run the main program (after a little SDL initialization) */
-	retval = console_main(argc, argv);
+	console_main(argc, argv);
 
-	SDL_stack_free(cmdline);
-	SDL_stack_free(argv);
-	return retval;
+	/* Hush little compiler, don't you cry... */
+	return 0;
 }