hm window_focus is good, but its also set to 1 if the Game is preselected on the taskbar but not opened. Then a crash happens.