getting renderer output size
authorMatthew Owens <matthew@owens.tech>
Fri, 2 Oct 2020 10:46:25 +0000 (11:46 +0100)
committerMatthew Owens <matthew@owens.tech>
Fri, 2 Oct 2020 10:46:25 +0000 (11:46 +0100)
src/main.c

index b464d65..237d63c 100644 (file)
@@ -224,6 +224,10 @@ int main()
        //TODO: run on primary display
        if(!init()) { return 1; }
 
+       int w, h;
+       SDL_GetRendererOutputSize(renderer, &w, &h);
+       COUT("output size: (%d, %d)", w, h);
+
        while(!quit) {
                update();
                render();