better gfx mode handling for ios