- SDL_Rect srect = {0, 0, 240, 160};
- SDL_Rect drect = {40, 40, 240, 160};
- SDL_BlitSurface(screen, &srect, hw_screen, &drect);
- }
- else if((screen_scale == scaled_aspect) &&
- (resolution_width == small_resolution_width) &&
- (resolution_height == small_resolution_height))
- {
- SDL_Rect drect = {0, 10, 0, 0};
- SDL_BlitSurface(screen, NULL, hw_screen, &drect);
- }
- else
- {
- SDL_BlitSurface(screen, NULL, hw_screen, NULL);
+ switch (screen_scale)
+ {
+ case unscaled:
+ {
+ SDL_Rect srect = {0, 0, 240, 160};
+ SDL_Rect drect = {40, 40, 240, 160};
+ warm_cache_op_all(WOP_D_CLEAN);
+ SDL_BlitSurface(screen, &srect, hw_screen, &drect);
+ return;
+ }
+ case scaled_aspect:
+ {
+ SDL_Rect drect = {0, 10, 0, 0};
+ warm_cache_op_all(WOP_D_CLEAN);
+ SDL_BlitSurface(screen, NULL, hw_screen, &drect);
+ return;
+ }
+ case scaled_aspect_sw:
+ {
+ upscale_aspect(hw_screen->pixels, get_screen_pixels());
+ return;
+ }
+ case fullscreen:
+ break;
+ }