Fix for black screen on Linux upon starting a game

Depends on @magcius's branch to be merged.
@lioncash delroth is questioning your code.