prepare upstreaming of linux games/
fix broken code