Don't bother with Win9x compatibility when building 64-bit binaries. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Thu, 13 Oct 2011 01:49:14 -0400
branchSDL-1.2
changeset 59831361a12b2e58
parent 5976 081c94f2c04a
child 5984 057c0a599fee
Don't bother with Win9x compatibility when building 64-bit binaries.

Fixes Bugzilla #1310.

Thanks to Ozkan Sezer for the patch!
src/video/wincommon/SDL_lowvideo.h
src/video/wincommon/SDL_sysevents.c
     1.1 --- a/src/video/wincommon/SDL_lowvideo.h	Tue Oct 11 22:04:51 2011 -0400
     1.2 +++ b/src/video/wincommon/SDL_lowvideo.h	Thu Oct 13 01:49:14 2011 -0400
     1.3 @@ -140,9 +140,13 @@
     1.4     GDL_CreateWindow as well */
     1.5  LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
     1.6  
     1.7 +#ifdef _WIN64
     1.8 +#define SDL_ToUnicode  ToUnicode
     1.9 +#else
    1.10  /* JFP: Implementation of ToUnicode() that works on 9x/ME/2K/XP */
    1.11  typedef int (WINAPI *ToUnicodeFN)(UINT, UINT, const BYTE *, LPWSTR, int, UINT);
    1.12  
    1.13  extern ToUnicodeFN SDL_ToUnicode;
    1.14 +#endif
    1.15  
    1.16  #endif /* SDL_lowvideo_h */
     2.1 --- a/src/video/wincommon/SDL_sysevents.c	Tue Oct 11 22:04:51 2011 -0400
     2.2 +++ b/src/video/wincommon/SDL_sysevents.c	Thu Oct 13 01:49:14 2011 -0400
     2.3 @@ -95,6 +95,7 @@
     2.4  extern void DIB_SwapGamma(_THIS);
     2.5  
     2.6  #ifndef NO_GETKEYBOARDSTATE
     2.7 +#ifndef _WIN64
     2.8  /* Variables and support functions for SDL_ToUnicode() */
     2.9  static int codepage;
    2.10  static int Is9xME();
    2.11 @@ -102,6 +103,7 @@
    2.12  static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const BYTE *keystate, LPWSTR wchars, int wsize, UINT flags);
    2.13  
    2.14  ToUnicodeFN SDL_ToUnicode = ToUnicode9xME;
    2.15 +#endif
    2.16  #endif /* !NO_GETKEYBOARDSTATE */
    2.17  
    2.18  
    2.19 @@ -650,9 +652,10 @@
    2.20  		return(0);
    2.21  
    2.22  #ifndef NO_GETKEYBOARDSTATE
    2.23 -		case WM_INPUTLANGCHANGE: {
    2.24 +		case WM_INPUTLANGCHANGE:
    2.25 +#ifndef _WIN64
    2.26  			codepage = GetCodePage();
    2.27 -		}
    2.28 +#endif
    2.29  		return(TRUE);
    2.30  #endif
    2.31  
    2.32 @@ -760,6 +763,7 @@
    2.33  #endif /* WM_MOUSELEAVE */
    2.34  
    2.35  #ifndef NO_GETKEYBOARDSTATE
    2.36 +#ifndef _WIN64
    2.37  	/* Initialise variables for SDL_ToUnicode() */
    2.38  	codepage = GetCodePage();
    2.39  
    2.40 @@ -767,6 +771,7 @@
    2.41  	   const issue here... */
    2.42  	SDL_ToUnicode = Is9xME() ? ToUnicode9xME : (ToUnicodeFN) ToUnicode;
    2.43  #endif
    2.44 +#endif /* NO_GETKEYBOARDSTATE */
    2.45  
    2.46  	app_registered = 1;
    2.47  	return(0);
    2.48 @@ -793,6 +798,7 @@
    2.49  }
    2.50  
    2.51  #ifndef NO_GETKEYBOARDSTATE
    2.52 +#ifndef _WIN64
    2.53  /* JFP: Implementation of ToUnicode() that works on 9x/ME/2K/XP */
    2.54  
    2.55  static int Is9xME()
    2.56 @@ -829,5 +835,5 @@
    2.57  	}
    2.58  	return 0;
    2.59  }
    2.60 -
    2.61 +#endif
    2.62  #endif /* !NO_GETKEYBOARDSTATE */