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 916 - Calling SDL_VideoInit( NULL,0 ); blocks all events from occurring
Summary: Calling SDL_VideoInit( NULL,0 ); blocks all events from occurring
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Windows (XP)
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-24 21:05 UTC by Ken Rogoway
Modified: 2010-01-24 11:47 UTC (History)
0 users

See Also:


Attachments
Project, Source and Assets to demonstrate the bug (1.13 MB, application/zip)
2009-12-24 21:05 UTC, Ken Rogoway
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Rogoway 2009-12-24 21:05:55 UTC
Created attachment 471 [details]
Project, Source and Assets to demonstrate the bug

If you are using SDL 1.3 Native functions and call:

SDL_VideoInit( NULL,0 );

You will not get any events in the SDL_Event structure when you call SDL_PollEvents().

I have attached a sample app to demonstrate this.  If you run it like this:

MinApp.exe

Everything works fine.

If you run it like this:

MinApp.exe -videoinit

All events are blocked.

Sources and assets provided.  Built against SDL 1.3 Revision 5437

If you build it with VS2005 you will need to change the Include and Library path to point to your SDL.

If you run it under the debugger you will need to add "..\Bin" as your working directory.
Comment 1 Sam Lantinga 2010-01-24 11:47:40 UTC
Actually you don't need to call SDL_VideoInit() if you call SDL_Init(SDL_INIT_VIDEO) (guess why? ;))

However this should still work, and I've fixed it in subversion:
Committed revision 5536

Thanks!