More work on Windows build issues.
--HG-- branch : SDL-1.2
This commit is contained in:
parent
b5187bc2c8
commit
6e00ea067e
4 changed files with 7 additions and 11 deletions
|
@ -59,12 +59,7 @@ AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
if test -z "$host_alias"; then
|
AC_CHECK_TOOL(WINDRES, [windres], [:])
|
||||||
hostaliaswindres=
|
|
||||||
else
|
|
||||||
hostaliaswindres="$host_alias-windres"
|
|
||||||
fi
|
|
||||||
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
|
|
||||||
|
|
||||||
dnl Set up the compiler and linker flags
|
dnl Set up the compiler and linker flags
|
||||||
INCLUDE="-I$srcdir/include"
|
INCLUDE="-I$srcdir/include"
|
||||||
|
|
|
@ -65,7 +65,7 @@ typedef struct ThreadStartParms
|
||||||
pfnSDL_CurrentEndThread pfnCurrentEndThread;
|
pfnSDL_CurrentEndThread pfnCurrentEndThread;
|
||||||
} tThreadStartParms, *pThreadStartParms;
|
} tThreadStartParms, *pThreadStartParms;
|
||||||
|
|
||||||
static DWORD WINAPI RunThread(LPVOID *data)
|
static unsigned __stdcall RunThread(void *data)
|
||||||
{
|
{
|
||||||
pThreadStartParms pThreadParms = (pThreadStartParms)data;
|
pThreadStartParms pThreadParms = (pThreadStartParms)data;
|
||||||
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
|
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
|
||||||
|
@ -99,7 +99,6 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
||||||
pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
|
pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
|
||||||
#endif
|
#endif
|
||||||
#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
|
#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
|
||||||
DWORD threadid = 0;
|
|
||||||
pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms));
|
pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms));
|
||||||
if (!pThreadParms) {
|
if (!pThreadParms) {
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
|
@ -112,10 +111,12 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
||||||
pThreadParms->args = args;
|
pThreadParms->args = args;
|
||||||
|
|
||||||
if (pfnBeginThread) {
|
if (pfnBeginThread) {
|
||||||
|
unsigned threadid = 0;
|
||||||
thread->handle = (SYS_ThreadHandle)
|
thread->handle = (SYS_ThreadHandle)
|
||||||
((size_t) pfnBeginThread(NULL, 0, RunThread,
|
((size_t) pfnBeginThread(NULL, 0, RunThread,
|
||||||
pThreadParms, 0, &threadid));
|
pThreadParms, 0, &threadid));
|
||||||
} else {
|
} else {
|
||||||
|
DWORD threadid = 0;
|
||||||
thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid);
|
thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid);
|
||||||
}
|
}
|
||||||
if (thread->handle == NULL) {
|
if (thread->handle == NULL) {
|
||||||
|
|
|
@ -99,7 +99,7 @@ extern void DIB_SwapGamma(_THIS);
|
||||||
static int codepage;
|
static int codepage;
|
||||||
static int Is9xME();
|
static int Is9xME();
|
||||||
static int GetCodePage();
|
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;
|
ToUnicodeFN SDL_ToUnicode = ToUnicode9xME;
|
||||||
#endif /* !NO_GETKEYBOARDSTATE */
|
#endif /* !NO_GETKEYBOARDSTATE */
|
||||||
|
@ -816,7 +816,7 @@ static int GetCodePage()
|
||||||
return cp;
|
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];
|
BYTE chars[2];
|
||||||
|
|
||||||
|
|
|
@ -947,7 +947,7 @@ int DX5_CreateWindow(_THIS)
|
||||||
|
|
||||||
SDL_windowid = (windowid != NULL);
|
SDL_windowid = (windowid != NULL);
|
||||||
if ( SDL_windowid ) {
|
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 ) {
|
if ( SDL_Window == NULL ) {
|
||||||
SDL_SetError("Couldn't get user specified window");
|
SDL_SetError("Couldn't get user specified window");
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue