Re: how to check for an event
"speartip" <[email protected]> Wed, 15 Feb 2017 18:02:11 +0000
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
I wanted to update, to focus the problem at hand and make sure nobody thought I was asking them to fix my compiler. No way!
This line initializes.
Code:
if (SDL_Init(SDL_INIT_EVERYTHING) == 0) {
printf("SDL_Init failed: %s\n", SDL_GetError());
return 1;}
Here I've purposely induced an error state by changing
Code:
(SDL_Init(SDL_INIT_EVERYTHING) != 0) to (SDL_Init(SDL_INIT_EVERYTHING) == 0)
The error is then thrown and 1/2 of the statement is printed from printf above see bold below:
SDL_Init failed: . But the other half of the statement isn't printed.
But no value for
Code:
SDL,GetError()
is returned on the same line.
In short my printf statement is cut in half.
_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org