moving on
[eradicate] / src / sdl / main.c
index 86e5198..b672ee6 100644 (file)
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
                fprintf(stderr, "failed to allocate virtual framebuffer\n");
                return 1;
        }
-       fb_pixels = (uint16_t*)((char*)fb_buf + FB_WIDTH * 2);
+       vmem = fb_pixels = (uint16_t*)((char*)fb_buf + FB_WIDTH * 2);
 
        SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE);
        if(!(fbsurf = SDL_SetVideoMode(xsz, ysz, FB_BPP, sdl_flags))) {
@@ -99,6 +99,8 @@ void blit_frame(void *pixels, int vsync)
        int i, j;
        unsigned short *sptr, *dptr;
 
+       if(show_fps) dbg_fps(pixels);
+
        if(vsync) {
                wait_vsync();
        }