-
- if(SDL_MUSTLOCK(fbsurf)) {
- SDL_LockSurface(fbsurf);
- }
-
- sptr = fb_pixels;
- dptr = (unsigned short*)fbsurf->pixels + (fbsurf->w - xsz) / 2;
- for(i=0; i<fb_height; i++) {
- for(j=0; j<fb_width; j++) {
- int x, y;
- unsigned short pixel = *sptr++;
-
- for(y=0; y<fbscale; y++) {
- for(x=0; x<fbscale; x++) {
- dptr[y * fbsurf->w + x] = pixel;
- }
- }
- dptr += fbscale;
- }
- dptr += (fbsurf->w - fb_width) * fbscale;
- }
-
- if(SDL_MUSTLOCK(fbsurf)) {
- SDL_UnlockSurface(fbsurf);
- }
- SDL_Flip(fbsurf);