Detecting/interrupting when a user is quitting the program
Posted: Sun Jul 30, 2017 11:29 am
I'm working on a multiplayer game, and I'm currently looking into a way to prepare the client for a shutdown with Alt-F4 or ⌘Q if a user tries to midgame. As it stands, both sides work, however if a player quits, it currently leaves the player on the server for a few brief moments.
I've tried the usual keypress routines but they don't seem to beat the quit command (at least on macOS). How do I get LÖVE to run custom commands or a function as soon as LÖVE is closed?
I've tried the usual keypress routines but they don't seem to beat the quit command (at least on macOS). How do I get LÖVE to run custom commands or a function as soon as LÖVE is closed?