Skip to content
Permalink
Browse files

More work on Windows build issues.

  • Loading branch information
icculus committed Sep 11, 2011
1 parent 3e25bf3 commit d558750b50c22333fb43fba79737538df7b95190
Showing with 7 additions and 11 deletions.
  1. +1 −6 configure.in
  2. +3 −2 src/thread/win32/SDL_systhread.c
  3. +2 −2 src/video/wincommon/SDL_sysevents.c
  4. +1 −1 src/video/windx5/SDL_dx5events.c
@@ -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"
@@ -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) {
@@ -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];

@@ -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);

0 comments on commit d558750

Please sign in to comment.