macroquad
macroquad copied to clipboard
Call to request quit
Would be useful to have some call to request to quit the app (so close the program on desktops, exit application on mobile, stop processing on the web, etc...).
For note, I built a mini event-processing system in my main state that I inject events into, bit odd as I basically transformed the loop into an event processor that renders when a Render(delta)
event comes through among all the other events that happen, but eh, it's much more familiar and efficient (and shorter than what was being done before).
@OvermindDL1 I achieved this by break
ing out of the main loop. Alternatively, you could return
out of it from a deeply nested loop.
Also wondering about this. Is there a way to just request macroquad to clean up and close everything from any function?
A quick and dirty hack I have done before is using std::process::exit(0)
to quit the program from anywhere, but im not sure how it would behave in other environments like on the web. It also seems less than ideal because there seems to be a slight delay between when you call it and when the process actually closes.