X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fsdl%2Fmain.c;h=80fab1a07d4a8f83355355fe4e46f2294b7d814f;hb=03eaea2400647375400c3bc4d927c399e142a901;hp=cfd97616b701f1dd1088071e42af61ad1292e7d6;hpb=713d33d0c193f880d665dc6f4e62eac9549b747e;p=eradicate diff --git a/src/sdl/main.c b/src/sdl/main.c index cfd9761..80fab1a 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; + dbg_fps(pixels); + if(vsync) { wait_vsync(); } - dbg_fps(pixels); - if(SDL_MUSTLOCK(fbsurf)) { SDL_LockSurface(fbsurf); }