Fixed bug #1109
authorSam Lantinga
Thu, 27 Jan 2011 08:40:06 -0800
changeset 5108d68e9722ff4d
parent 5107 30da7089dcb4
child 5109 5df0c142db9b
Fixed bug #1109

Ozkan Sezer 2011-01-26 12:33:42 PST

I got warnings from SDL_windowskeyboard.c when I compiled for win64.
src/video/windows/SDL_windowskeyboard.c
     1.1 --- a/src/video/windows/SDL_windowskeyboard.c	Thu Jan 27 07:05:13 2011 -0800
     1.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Thu Jan 27 08:40:06 2011 -0800
     1.3 @@ -534,7 +534,7 @@
     1.4          return dwRet[uIndex];
     1.5  
     1.6      hklprev = hkl;
     1.7 -    dwLang = ((DWORD)hkl & 0xffff);
     1.8 +    dwLang = ((DWORD_PTR)hkl & 0xffff);
     1.9      if (videodata->ime_uiless && LANG() == LANG_CHT) {
    1.10          dwRet[0] = IMEID_CHT_VER_VISTA;
    1.11          dwRet[1] = 0;
    1.12 @@ -781,7 +781,7 @@
    1.13                      UINT cchars = 0;
    1.14  
    1.15                      for (; i < videodata->ime_candcount; ++i) {
    1.16 -                        UINT len = SDL_wcslen((LPWSTR)((DWORD)cand_list + cand_list->dwOffset[i])) + 1;
    1.17 +                        UINT len = SDL_wcslen((LPWSTR)((DWORD_PTR)cand_list + cand_list->dwOffset[i])) + 1;
    1.18                          if (len + cchars > maxcandchar) {
    1.19                              if (i > cand_list->dwSelection)
    1.20                                  break;
    1.21 @@ -801,7 +801,7 @@
    1.22                  }
    1.23                  SDL_memset(&videodata->ime_candidates, 0, sizeof(videodata->ime_candidates));
    1.24                  for (i = page_start, j = 0; (DWORD)i < cand_list->dwCount && j < (int)videodata->ime_candpgsize; i++, j++) {
    1.25 -                    LPCWSTR candidate = (LPCWSTR)((DWORD)cand_list + cand_list->dwOffset[i]);
    1.26 +                    LPCWSTR candidate = (LPCWSTR)((DWORD_PTR)cand_list + cand_list->dwOffset[i]);
    1.27                      IME_AddCandidate(videodata, j, candidate);
    1.28                  }
    1.29                  if (PRIMLANG() == LANG_KOREAN || (PRIMLANG() == LANG_CHT && !IME_GetId(videodata, 0)))