| ... | ... |
@@ -91,10 +91,8 @@ save_screenshot(void) |
| 91 | 91 |
int w, h; |
| 92 | 92 |
SDL_GetRendererOutputSize(gRenderer, &w, &h); |
| 93 | 93 |
SDL_Surface *surface = SDL_CreateRGBSurfaceWithFormat(0, w, h, 32, format); |
| 94 |
- SDL_LockSurface(surface); |
|
| 95 | 94 |
SDL_RenderReadPixels(gRenderer, NULL, format, surface->pixels, surface->pitch); |
| 96 | 95 |
SDL_SaveBMP(surface, "screenshot.bmp"); |
| 97 |
- SDL_UnlockSurface(surface); |
|
| 98 | 96 |
SDL_FreeSurface(surface); |
| 99 | 97 |
} |
| 100 | 98 |
|