detect the "mandatory switch" menu

This requires a slightly slower text_wait function. There is probably a
way to refactor that function in a way that doesn't cause cancer.