Recording Software Conflict

I was doing some recording (using OBS) for a game trailer when I noticed something rather strange. If the recording software was capturing the game in question, the game would crash upon calling “Sys.exit().” On the other hand, leaving the game via the “X” icon on the window would not crash the game. I also wonder if this could have been what caused a black screen issue earlier.

Any insights? Is there an alternate way to close the game in windows that doesn’t use “Sys.exit()?”

I had some problems with crashes on exit and now I do this and it seems to work across platforms. Not sure if it will help your particular issue, but it may be that you just need to specify the 0 parameter?

#if cpp

As far as I know, the number is just for error logging. You can specify 1, for instance, if you want to indicate that the game exited gracefully but under abnormal/unexpected behavior.

Does System.exit behave any differently/better?

Tried it while doing some of the recording and that appears to be much better. No crashes. Not sure it explains the black screen issue from earlier, but its still an improvement for sure. Thanks.