It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005 --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401334
This commit is contained in:
parent
5372bfd326
commit
6c3f928cd8
101 changed files with 8882 additions and 601 deletions
|
@ -22,10 +22,8 @@
|
|||
|
||||
/* Application focus/iconification handling code for SDL */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_events_c.h"
|
||||
|
||||
|
||||
|
|
|
@ -22,13 +22,11 @@
|
|||
|
||||
/* General event handling code for SDL */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_events_c.h"
|
||||
#include "SDL_timer_c.h"
|
||||
#ifndef DISABLE_JOYSTICK
|
||||
|
@ -177,7 +175,12 @@ static int SDL_StartEventThread(Uint32 flags)
|
|||
|
||||
/* The event thread will handle timers too */
|
||||
SDL_SetTimerThreaded(2);
|
||||
#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
|
||||
#undef SDL_CreateThread
|
||||
SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL);
|
||||
#else
|
||||
SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL);
|
||||
#endif
|
||||
if ( SDL_EventThread == NULL ) {
|
||||
return(-1);
|
||||
}
|
||||
|
|
|
@ -22,14 +22,10 @@
|
|||
|
||||
/* General keyboard handling code for SDL */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_events_c.h"
|
||||
#include "SDL_sysevents.h"
|
||||
|
||||
|
@ -58,17 +54,14 @@ int SDL_KeyboardInit(void)
|
|||
{
|
||||
SDL_VideoDevice *video = current_video;
|
||||
SDL_VideoDevice *this = current_video;
|
||||
Uint16 i;
|
||||
|
||||
/* Set default mode of UNICODE translation */
|
||||
SDL_EnableUNICODE(DEFAULT_UNICODE_TRANSLATION);
|
||||
|
||||
/* Initialize the tables */
|
||||
SDL_ModState = KMOD_NONE;
|
||||
for ( i=0; i<SDL_TABLESIZE(keynames); ++i )
|
||||
keynames[i] = NULL;
|
||||
for ( i=0; i<SDL_TABLESIZE(SDL_KeyState); ++i )
|
||||
SDL_KeyState[i] = SDL_RELEASED;
|
||||
memset(keynames, 0, sizeof(keynames));
|
||||
memset(SDL_KeyState, 0, sizeof(SDL_KeyState));
|
||||
video->InitOSKeymap(this);
|
||||
|
||||
SDL_EnableKeyRepeat(0, 0);
|
||||
|
|
|
@ -22,11 +22,8 @@
|
|||
|
||||
/* General mouse handling code for SDL */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_string.h"
|
||||
#include "SDL_events_c.h"
|
||||
#include "SDL_cursor_c.h"
|
||||
#include "SDL_sysvideo.h"
|
||||
|
|
|
@ -22,12 +22,9 @@
|
|||
|
||||
/* General quit handling code for SDL */
|
||||
|
||||
#if defined (_WIN32_WCE)
|
||||
#define NO_SIGNAL_H
|
||||
#endif
|
||||
#include "SDL_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef NO_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
|
@ -35,7 +32,7 @@
|
|||
#include "SDL_events_c.h"
|
||||
|
||||
|
||||
#ifndef NO_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
static void SDL_HandleSIG(int sig)
|
||||
{
|
||||
/* Reset the signal handler */
|
||||
|
@ -44,12 +41,12 @@ static void SDL_HandleSIG(int sig)
|
|||
/* Signal a quit interrupt */
|
||||
SDL_PrivateQuit();
|
||||
}
|
||||
#endif /* NO_SIGNAL_H */
|
||||
#endif /* HAVE_SIGNAL_H */
|
||||
|
||||
/* Public functions */
|
||||
int SDL_QuitInit(void)
|
||||
{
|
||||
#ifndef NO_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
void (*ohandler)(int);
|
||||
|
||||
/* Both SIGINT and SIGTERM are translated into quit interrupts */
|
||||
|
@ -59,14 +56,14 @@ int SDL_QuitInit(void)
|
|||
ohandler = signal(SIGTERM, SDL_HandleSIG);
|
||||
if ( ohandler != SIG_DFL )
|
||||
signal(SIGTERM, ohandler);
|
||||
#endif /* NO_SIGNAL_H */
|
||||
#endif /* HAVE_SIGNAL_H */
|
||||
|
||||
/* That's it! */
|
||||
return(0);
|
||||
}
|
||||
void SDL_QuitQuit(void)
|
||||
{
|
||||
#ifndef NO_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
void (*ohandler)(int);
|
||||
|
||||
ohandler = signal(SIGINT, SIG_DFL);
|
||||
|
@ -75,7 +72,7 @@ void SDL_QuitQuit(void)
|
|||
ohandler = signal(SIGTERM, SIG_DFL);
|
||||
if ( ohandler != SDL_HandleSIG )
|
||||
signal(SIGTERM, ohandler);
|
||||
#endif /* NO_SIGNAL_H */
|
||||
#endif /* HAVE_SIGNAL_H */
|
||||
}
|
||||
|
||||
/* This function returns 1 if it's okay to close the application window */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue