first attempt at setting write-combining with MTRRs. It works, but no
[retrobench] / src / dos / main.c
index 761dd56..048aa9d 100644 (file)
@@ -67,21 +67,25 @@ int main(int argc, char **argv)
 end:
        set_text_mode();
        cleanup_video();
+       stop_logger();
 
        if(num_frames) {
+               printf("%d frames in %d msec\n", num_frames, time_msec);
                printf("avg framerate: %.1f fps\n", (10000 * num_frames / time_msec) / 10.0f);
        }
        return 0;
 }
 
-int resizefb(int x, int y, int bpp)
+int resizefb(int x, int y, int bpp, int pitch)
 {
+       printf("resizefb %dx%d %dbpp (pitch: %d)\n", x, y, bpp, pitch);
+
        free(framebuf);
 
        fb_width = x;
        fb_height = y;
        fb_bpp = bpp;
-       fb_pitch = x * bpp / 8;
+       fb_pitch = pitch;
 
        if(!(framebuf = malloc(fb_pitch * fb_height))) {
                fprintf(stderr, "failed to allocate %dx%d (%dbpp) framebuffer\n",