Move miSetVisualTypes call outside an if conditional

The function call is a bit long, take it out of the conditional and use a ret variable instead.