win_check_pause function