implementation of autogetVideoMode