X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fsdl%2Fmain.c;h=b672ee63da6c20c9354df6af71295d22043d1a83;hb=d54a3962dcb42f9921be75cf3754525ecef2bab6;hp=cfd97616b701f1dd1088071e42af61ad1292e7d6;hpb=713d33d0c193f880d665dc6f4e62eac9549b747e;p=eradicate diff --git a/src/sdl/main.c b/src/sdl/main.c index cfd9761..b672ee6 100644 --- a/src/sdl/main.c +++ b/src/sdl/main.c @@ -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,12 +99,12 @@ void blit_frame(void *pixels, int vsync) int i, j; unsigned short *sptr, *dptr; + if(show_fps) dbg_fps(pixels); + if(vsync) { wait_vsync(); } - dbg_fps(pixels); - if(SDL_MUSTLOCK(fbsurf)) { SDL_LockSurface(fbsurf); }