subsoap / defos

Extra native OS functions for games written using the Defold game engine
Creative Commons Zero v1.0 Universal
113 stars 15 forks source link

Fix crash on app reboot. Standardise indentation. #43

Closed dapetcu21 closed 6 years ago

dapetcu21 commented 6 years ago

There was a crash that happened if you tried to re-start the game from the editor on macOS with the game already running. In that case, Defold reused the process but the NSWindow handle changed and the old one kept by init_window() was invalid, causing crashes. I fixed it by getting the handle to the window in InitializeDefos().

I also enforced indentation consistency because it tickled my OCD. 😄