| Summary: | One-second delay within SDL_SetVideoMode | ||
|---|---|---|---|
| Product: | SDL | Reporter: | rgrocottbugzilla |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED ENDOFLIFE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.15 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
|
Description
rgrocottbugzilla
2012-09-06 16:56:45 UTC
Managed to reproduce this bug on a second machine, running a fairly vanilla installation of Windows 7, by running the videogame Eversion. The bug was exactly the same, except that (barring some kind of stupid oversight on my part) the bug occured the very first time that I ran the program after downloading it. This seems to rule out the possibility that SDL instances are somehow interfering with one another after being discarded. Managed to track down the cause. The bug can be solved by commenting out the first two calls to LoadKeyboardLayout in DIB_InitOSKeymap, in SDL_dibevents.c. Apparently, switching keyboard layouts is known to be very slow, under Windows 7 only. Since hLayoutUS doesn't seem to be used except as an (unnecessary?) argument to MapVirtualKeyEx, this bug could be solved by completely gutting the layout-loading code, and just going with the user's current layout. If this isn't possible, I believe that ActivateKeyboardLayout loads a keyboard layout synchronously. Doing this before the window is made visible will cause the delay to be much less evident to the user, although it would still delay the program's start by around 500ms. Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here. We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable. Our current focus is on SDL 2.0. If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features. Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases. Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation. Thank you, --ryan. |