c/main: Fixes bug with incorrect surface format matching.