Another shot at fixing the compiler warnings under Cygwin/MingW.
--HG-- branch : SDL-1.2
This commit is contained in:
parent
314fc920c2
commit
98bec7bf8e
3 changed files with 4 additions and 13 deletions
|
@ -68,11 +68,6 @@ typedef struct SDL_Thread SDL_Thread;
|
||||||
#ifdef __OS2__
|
#ifdef __OS2__
|
||||||
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
|
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
|
||||||
typedef void (*pfnSDL_CurrentEndThread)(void);
|
typedef void (*pfnSDL_CurrentEndThread)(void);
|
||||||
#elif __GNUC__
|
|
||||||
typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
|
|
||||||
unsigned (__stdcall *func)(void *), void *arg,
|
|
||||||
unsigned, unsigned *threadID);
|
|
||||||
typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
|
|
||||||
#else
|
#else
|
||||||
typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
|
typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
|
||||||
unsigned (__stdcall *func)(void *), void *arg,
|
unsigned (__stdcall *func)(void *), void *arg,
|
||||||
|
|
|
@ -36,12 +36,7 @@
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC__
|
#if defined(__WATCOMC__)
|
||||||
typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
|
|
||||||
unsigned (__stdcall *func)(void *), void *arg,
|
|
||||||
unsigned, unsigned *threadID);
|
|
||||||
typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
|
|
||||||
#elif defined(__WATCOMC__)
|
|
||||||
/* This is for Watcom targets except OS2 */
|
/* This is for Watcom targets except OS2 */
|
||||||
#if __WATCOMC__ < 1240
|
#if __WATCOMC__ < 1240
|
||||||
#define __watcall
|
#define __watcall
|
||||||
|
@ -65,7 +60,7 @@ typedef struct ThreadStartParms
|
||||||
pfnSDL_CurrentEndThread pfnCurrentEndThread;
|
pfnSDL_CurrentEndThread pfnCurrentEndThread;
|
||||||
} tThreadStartParms, *pThreadStartParms;
|
} tThreadStartParms, *pThreadStartParms;
|
||||||
|
|
||||||
static unsigned __stdcall RunThread(void *data)
|
static DWORD WINAPI RunThread(LPVOID data)
|
||||||
{
|
{
|
||||||
pThreadStartParms pThreadParms = (pThreadStartParms)data;
|
pThreadStartParms pThreadParms = (pThreadStartParms)data;
|
||||||
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
|
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
|
||||||
|
|
|
@ -820,7 +820,8 @@ static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const BYTE *keystate,
|
||||||
{
|
{
|
||||||
BYTE chars[2];
|
BYTE chars[2];
|
||||||
|
|
||||||
if (ToAsciiEx(vkey, scancode, keystate, (WORD*)chars, 0, GetKeyboardLayout(0)) == 1) {
|
/* arg #3 should be const BYTE *, but cygwin lists it as PBYTE. */
|
||||||
|
if (ToAsciiEx(vkey, scancode, (PBYTE) keystate, (WORD*)chars, 0, GetKeyboardLayout(0)) == 1) {
|
||||||
return MultiByteToWideChar(codepage, 0, chars, 1, wchars, wsize);
|
return MultiByteToWideChar(codepage, 0, chars, 1, wchars, wsize);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue