auto switch bitween direct and gae