src/video/windows/SDL_windowskeyboard.c
changeset 11803 454f6dc9cb85
parent 11471 510e461e584a
child 11811 5d94cb6b24d3
equal deleted inserted replaced
11802:3f5fad386f11 11803:454f6dc9cb85
   444     WCHAR *s = buffer;
   444     WCHAR *s = buffer;
   445     DWORD len = 0;
   445     DWORD len = 0;
   446     INT err = 0;
   446     INT err = 0;
   447     BOOL vertical = FALSE;
   447     BOOL vertical = FALSE;
   448     UINT maxuilen = 0;
   448     UINT maxuilen = 0;
   449     static OSVERSIONINFOA osversion;
       
   450 
   449 
   451     if (videodata->ime_uiless)
   450     if (videodata->ime_uiless)
   452         return;
   451         return;
   453 
   452 
   454     videodata->ime_readingstring[0] = 0;
   453     videodata->ime_readingstring[0] = 0;
   455     if (!osversion.dwOSVersionInfoSize) {
   454     
   456         osversion.dwOSVersionInfoSize = sizeof(osversion);
       
   457         GetVersionExA(&osversion);
       
   458     }
       
   459     id = IME_GetId(videodata, 0);
   455     id = IME_GetId(videodata, 0);
   460     if (!id)
   456     if (!id)
   461         return;
   457         return;
   462 
   458 
   463     himc = ImmGetContext(hwnd);
   459     himc = ImmGetContext(hwnd);
   514                 len = *(DWORD *)(p + 7*4 + 16*2*4);
   510                 len = *(DWORD *)(p + 7*4 + 16*2*4);
   515                 s = (WCHAR *)(p + 6*4 + 16*2*1);
   511                 s = (WCHAR *)(p + 6*4 + 16*2*1);
   516             }
   512             }
   517             break;
   513             break;
   518         case IMEID_CHS_VER42:
   514         case IMEID_CHS_VER42:
   519             if (osversion.dwPlatformId != VER_PLATFORM_WIN32_NT)
       
   520                 break;
       
   521 
       
   522             p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1*4 + 1*4 + 6*4);
   515             p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1*4 + 1*4 + 6*4);
   523             if (!p)
   516             if (!p)
   524                 break;
   517                 break;
   525 
   518 
   526             len = *(DWORD *)(p + 1*4 + (16*2+2*4) + 5*4 + 16*2);
   519             len = *(DWORD *)(p + 1*4 + (16*2+2*4) + 5*4 + 16*2);