More work on Windows build issues.

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon 2011-09-11 04:38:50 -04:00
parent b5187bc2c8
commit 6e00ea067e
4 changed files with 7 additions and 11 deletions

View file

@ -59,12 +59,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
if test -z "$host_alias"; then
hostaliaswindres=
else
hostaliaswindres="$host_alias-windres"
fi
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
AC_CHECK_TOOL(WINDRES, [windres], [:])
dnl Set up the compiler and linker flags
INCLUDE="-I$srcdir/include"

View file

@ -65,7 +65,7 @@ typedef struct ThreadStartParms
pfnSDL_CurrentEndThread pfnCurrentEndThread;
} tThreadStartParms, *pThreadStartParms;
static DWORD WINAPI RunThread(LPVOID *data)
static unsigned __stdcall RunThread(void *data)
{
pThreadStartParms pThreadParms = (pThreadStartParms)data;
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
@ -99,7 +99,6 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
#endif
#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
DWORD threadid = 0;
pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms));
if (!pThreadParms) {
SDL_OutOfMemory();
@ -112,10 +111,12 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
pThreadParms->args = args;
if (pfnBeginThread) {
unsigned threadid = 0;
thread->handle = (SYS_ThreadHandle)
((size_t) pfnBeginThread(NULL, 0, RunThread,
pThreadParms, 0, &threadid));
} else {
DWORD threadid = 0;
thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid);
}
if (thread->handle == NULL) {

View file

@ -99,7 +99,7 @@ extern void DIB_SwapGamma(_THIS);
static int codepage;
static int Is9xME();
static int GetCodePage();
static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, BYTE *keystate, LPWSTR wchars, int wsize, UINT flags);
static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const BYTE *keystate, LPWSTR wchars, int wsize, UINT flags);
ToUnicodeFN SDL_ToUnicode = ToUnicode9xME;
#endif /* !NO_GETKEYBOARDSTATE */
@ -816,7 +816,7 @@ static int GetCodePage()
return cp;
}
static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, PBYTE keystate, LPWSTR wchars, int wsize, UINT flags)
static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const PBYTE keystate, LPWSTR wchars, int wsize, UINT flags)
{
BYTE chars[2];

View file

@ -947,7 +947,7 @@ int DX5_CreateWindow(_THIS)
SDL_windowid = (windowid != NULL);
if ( SDL_windowid ) {
SDL_Window = (HWND)SDL_strtoull(windowid, NULL, 0);
SDL_Window = (HWND)((size_t)SDL_strtoull(windowid, NULL, 0));
if ( SDL_Window == NULL ) {
SDL_SetError("Couldn't get user specified window");
return(-1);