We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 695 - windib video init failes 1st time when using "SDL_WINDOWID" on XP
Summary: windib video init failes 1st time when using "SDL_WINDOWID" on XP
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: x86 Windows (XP)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-1.2.14
Depends on:
Blocks:
 
Reported: 2009-02-08 10:34 UTC by Nomad
Modified: 2009-09-21 02:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nomad 2009-02-08 10:34:43 UTC
The 2nd init is good.
The problem is in "SDL_dibevents.c"
in DIB_CreateWindow()

in SVN:
{
    char *windowid = SDL_getenv("SDL_WINDOWID");

    SDL_RegisterApp(NULL, 0, 0);

    ... using of data to which windowid is points

problem: 
    SDL_RegisterApp() may call SDL_getenv() and windowid will point to some wrong string

solve:
    char *windowid;

    SDL_RegisterApp(NULL, 0, 0);

    windowid = SDL_getenv("SDL_WINDOWID");
Comment 1 Ryan C. Gordon 2009-09-13 16:33:02 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 2 Sam Lantinga 2009-09-21 02:54:45 UTC
Thanks, this is fixed in subversion!