| Summary: | SDL crashes when creating a window on Windows XP | ||
|---|---|---|---|
| Product: | SDL | Reporter: | John Wilson <johnnyc.wilson> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | roger.levy |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
This is fixed, thanks! http://hg.libsdl.org/SDL/rev/6546eaa20271 |
SDL tries to grab some functions from user32.dll data->userDLL = LoadLibrary(TEXT("USER32.DLL")); if (data->userDLL) { data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) GetProcAddress(data->userDLL, "CloseTouchInputHandle"); data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) GetProcAddress(data->userDLL, "GetTouchInputInfo"); data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) GetProcAddress(data->userDLL, "RegisterTouchWindow"); } On Windows XP, these functions do not exist in user32.dll, so when SDL tries to call one of them, it calls a null pointer and crashes. /* Enable multi-touch */ videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));