main: Fix bug with incorrect surface format matching.