Fix for black screen on Linux upon starting a game

Depends on @magcius's branch to be merged.
@magcius ???