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