Skip to content

Commit

Permalink
More work on Windows build issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 11, 2011
1 parent 3e25bf3 commit d558750
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
7 changes: 1 addition & 6 deletions configure.in
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions src/thread/win32/SDL_systhread.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/video/wincommon/SDL_sysevents.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion src/video/windx5/SDL_dx5events.c
Expand Up @@ -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);
Expand Down

0 comments on commit d558750

Please sign in to comment.