Basicly all my window does is close out an returns -1 (note this is not the whole code) Any ideas why this wouldn’t wait for the user to want to [x] out of window?
Basicly all my window does is close out an returns -1 (note this is not the
whole code) Any ideas why this wouldn’t wait for the user to want to [x] out
of window?
Basicly all my window does is close out an returns -1 (note this is not
the whole code) Any ideas why this wouldn’t wait for the user to want to
[x] out of window?
Are you initializing SDL properly? Are you checking SDL_Init’s return code? Can
you post the whole code? If you realign your code’scurly brackets, then it’s
only ever polls for one event and quits:
Basicly all my window does is close out an returns -1 (note this is not the
whole code) Any ideas why this wouldn’t wait for the user to want to [x] out
of window?
I don’t know what other problems the code may have, but you must remove
"return Running". As soon as there is a single event in the queue, this code
will return true or false but it will not process all the events in the
queue. What you want, is to change “break;” right after "Running = false;“
If you make both of those changes then your code will stay in a loop looking
for a quit event until you find one. Then it will set Running to false, and
"break” out of the inner while loop. That will let the outer while loop exit
(because Running will now be false.
Bob PendletonOn Tue, Nov 17, 2009 at 5:42 PM, Tivoilos wrote: