Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SDL_windows.h is no longer necessary
  • Loading branch information
slouken committed Feb 25, 2006
1 parent 93de2a6 commit b024a0c
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 68 deletions.
3 changes: 2 additions & 1 deletion include/SDL_syswm.h
Expand Up @@ -116,7 +116,8 @@ typedef struct SDL_SysWMinfo {
} SDL_SysWMinfo;

#elif SDL_VIDEO_DRIVER_WINDIB || SDL_VIDEO_DRIVER_DDRAW
#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

/* The windows custom event structure */
struct SDL_SysWMmsg {
Expand Down
43 changes: 0 additions & 43 deletions include/SDL_windows.h

This file was deleted.

3 changes: 2 additions & 1 deletion src/SDL.c
Expand Up @@ -327,7 +327,8 @@ unsigned _System LibMain(unsigned hmod, unsigned termination)

#if !defined(HAVE_LIBC) || defined(_WIN32_WCE) || (defined(__WATCOMC__) && defined(BUILD_DLL))
/* Need to include DllMain() on Windows CE and Watcom C for some reason.. */
#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

BOOL APIENTRY _DllMainCRTStartup( HANDLE hModule,
DWORD ul_reason_for_call,
Expand Down
3 changes: 2 additions & 1 deletion src/audio/windib/SDL_dibaudio.c
Expand Up @@ -23,7 +23,8 @@

/* Allow access to a raw mixing buffer */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

#include "SDL_timer.h"
Expand Down
3 changes: 2 additions & 1 deletion src/audio/windx5/directx.h
Expand Up @@ -4,7 +4,8 @@

/* Include all of the DirectX 5.0 headers and adds any necessary tweaks */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
#ifndef WIN32
#define WIN32
Expand Down
3 changes: 2 additions & 1 deletion src/cdrom/win32/SDL_syscdrom.c
Expand Up @@ -23,7 +23,8 @@

/* Functions for system-level CD-ROM audio control */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

#include "SDL_cdrom.h"
Expand Down
3 changes: 2 additions & 1 deletion src/joystick/win32/SDL_mmjoystick.c
Expand Up @@ -23,7 +23,8 @@

/* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
#include <regstr.h>

Expand Down
3 changes: 2 additions & 1 deletion src/loadso/win32/SDL_sysloadso.c
Expand Up @@ -24,7 +24,8 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_loadso.h"

Expand Down
3 changes: 2 additions & 1 deletion src/main/win32/SDL_win32_main.c
Expand Up @@ -7,7 +7,8 @@
#include <stdio.h>
#include <stdlib.h>

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#ifdef _WIN32_WCE
# define DIR_SEPERATOR TEXT("\\")
Expand Down
3 changes: 2 additions & 1 deletion src/stdlib/SDL_getenv.c
Expand Up @@ -27,7 +27,8 @@

#if defined(__WIN32__) && !defined(_WIN32_WCE)

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

/* Note this isn't thread-safe! */

Expand Down
3 changes: 2 additions & 1 deletion src/stdlib/SDL_malloc.c
Expand Up @@ -485,7 +485,8 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#endif /* _WIN32 */
#endif /* WIN32 */
#ifdef WIN32
#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define HAVE_MMAP 1
#define HAVE_MORECORE 0
#define LACKS_UNISTD_H
Expand Down
8 changes: 8 additions & 0 deletions src/stdlib/SDL_stdlib.c
Expand Up @@ -30,6 +30,14 @@

#if defined(_MSC_VER)

#ifndef __FLTUSED__
#define __FLTUSED__
#ifdef __cplusplus
extern "C"
#endif
__declspec(selectany) int _fltused=1;
#endif

/* Float to long */
void __declspec(naked) _ftol()
{
Expand Down
3 changes: 2 additions & 1 deletion src/thread/win32/SDL_sysmutex.c
Expand Up @@ -23,7 +23,8 @@

/* Mutex functions using the Win32 API */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_mutex.h"

Expand Down
3 changes: 2 additions & 1 deletion src/thread/win32/SDL_syssem.c
Expand Up @@ -23,7 +23,8 @@

/* Semaphore functions using the Win32 API */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_thread.h"
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
Expand Down
3 changes: 2 additions & 1 deletion src/thread/win32/SDL_systhread.c
Expand Up @@ -23,7 +23,8 @@

/* Win32 thread management routines for SDL */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_thread.h"
#include "../SDL_thread_c.h"
Expand Down
3 changes: 2 additions & 1 deletion src/thread/win32/SDL_systhread_c.h
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

typedef HANDLE SYS_ThreadHandle;

4 changes: 3 additions & 1 deletion src/thread/win32/win_ce_semaphore.c
Expand Up @@ -28,7 +28,9 @@
and it is not clear how to handle a mixture of WCE semaphores and normal
events and mutexes. */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "win_ce_semaphore.h"

static SYNCHHANDLE CleanUp (SYNCHHANDLE hSynch, DWORD Flags);
Expand Down
3 changes: 2 additions & 1 deletion src/timer/win32/SDL_systimer.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

#include "SDL_timer.h"
Expand Down
3 changes: 2 additions & 1 deletion src/timer/wince/SDL_systimer.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

#include "SDL_timer.h"
Expand Down
3 changes: 2 additions & 1 deletion src/video/wincommon/SDL_lowvideo.h
Expand Up @@ -24,7 +24,8 @@
#ifndef _SDL_lowvideo_h
#define _SDL_lowvideo_h

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "../SDL_sysvideo.h"

Expand Down
3 changes: 2 additions & 1 deletion src/video/wincommon/SDL_sysevents.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_events.h"
#include "SDL_video.h"
Expand Down
3 changes: 2 additions & 1 deletion src/video/wincommon/SDL_sysmouse.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_mouse.h"
#include "../../events/SDL_events_c.h"
Expand Down
3 changes: 2 additions & 1 deletion src/video/wincommon/SDL_syswm.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_version.h"
#include "SDL_video.h"
Expand Down
3 changes: 2 additions & 1 deletion src/video/windib/SDL_dibevents.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include "SDL_main.h"
#include "SDL_events.h"
Expand Down
3 changes: 2 additions & 1 deletion src/video/windib/SDL_dibvideo.c
Expand Up @@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#if defined(_WIN32_WCE)

Expand Down
3 changes: 2 additions & 1 deletion src/video/windib/SDL_dibvideo.h
Expand Up @@ -24,7 +24,8 @@
#ifndef _SDL_dibvideo_h
#define _SDL_dibvideo_h

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

/* for PDA */
typedef enum
Expand Down
3 changes: 2 additions & 1 deletion src/video/windx5/directx.h
Expand Up @@ -4,7 +4,8 @@

/* Include all of the DirectX 5.0 headers and adds any necessary tweaks */

#include "SDL_windows.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
#ifndef WIN32
#define WIN32
Expand Down

0 comments on commit b024a0c

Please sign in to comment.