Commit 1bdfc84e authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #1109

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

I got warnings from SDL_windowskeyboard.c when I compiled for win64.
parent e2a13f89
...@@ -534,7 +534,7 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex) ...@@ -534,7 +534,7 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex)
return dwRet[uIndex]; return dwRet[uIndex];
hklprev = hkl; hklprev = hkl;
dwLang = ((DWORD)hkl & 0xffff); dwLang = ((DWORD_PTR)hkl & 0xffff);
if (videodata->ime_uiless && LANG() == LANG_CHT) { if (videodata->ime_uiless && LANG() == LANG_CHT) {
dwRet[0] = IMEID_CHT_VER_VISTA; dwRet[0] = IMEID_CHT_VER_VISTA;
dwRet[1] = 0; dwRet[1] = 0;
...@@ -781,7 +781,7 @@ IME_GetCandidateList(HIMC himc, SDL_VideoData *videodata) ...@@ -781,7 +781,7 @@ IME_GetCandidateList(HIMC himc, SDL_VideoData *videodata)
UINT cchars = 0; UINT cchars = 0;
for (; i < videodata->ime_candcount; ++i) { for (; i < videodata->ime_candcount; ++i) {
UINT len = SDL_wcslen((LPWSTR)((DWORD)cand_list + cand_list->dwOffset[i])) + 1; UINT len = SDL_wcslen((LPWSTR)((DWORD_PTR)cand_list + cand_list->dwOffset[i])) + 1;
if (len + cchars > maxcandchar) { if (len + cchars > maxcandchar) {
if (i > cand_list->dwSelection) if (i > cand_list->dwSelection)
break; break;
...@@ -801,7 +801,7 @@ IME_GetCandidateList(HIMC himc, SDL_VideoData *videodata) ...@@ -801,7 +801,7 @@ IME_GetCandidateList(HIMC himc, SDL_VideoData *videodata)
} }
SDL_memset(&videodata->ime_candidates, 0, sizeof(videodata->ime_candidates)); SDL_memset(&videodata->ime_candidates, 0, sizeof(videodata->ime_candidates));
for (i = page_start, j = 0; (DWORD)i < cand_list->dwCount && j < (int)videodata->ime_candpgsize; i++, j++) { for (i = page_start, j = 0; (DWORD)i < cand_list->dwCount && j < (int)videodata->ime_candpgsize; i++, j++) {
LPCWSTR candidate = (LPCWSTR)((DWORD)cand_list + cand_list->dwOffset[i]); LPCWSTR candidate = (LPCWSTR)((DWORD_PTR)cand_list + cand_list->dwOffset[i]);
IME_AddCandidate(videodata, j, candidate); IME_AddCandidate(videodata, j, candidate);
} }
if (PRIMLANG() == LANG_KOREAN || (PRIMLANG() == LANG_CHT && !IME_GetId(videodata, 0))) if (PRIMLANG() == LANG_KOREAN || (PRIMLANG() == LANG_CHT && !IME_GetId(videodata, 0)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment