Made it so that game only works when window is focused.