Advertisement
dominus

Untitled

Jan 10th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.12 KB | None | 0 0
  1. diff --git a/imagewin/imagewin.cc b/imagewin/imagewin.cc
  2. index 723b39d..4d488c0 100644
  3. --- a/imagewin/imagewin.cc
  4. +++ b/imagewin/imagewin.cc
  5. @@ -555,9 +555,13 @@ void Image_window::create_surface(
  6.  
  7.     get_draw_dims(w, h, scale, fill_mode, game_width, game_height, inter_width, inter_height);
  8.  
  9. +#if SDL_VERSION_ATLEAST(2, 0, 0)
  10. +   if (try_scaler(w, h) == false) {
  11. +#else
  12.     if ((game_width != inter_width || game_height != inter_height ||
  13.             static_cast<int>(w) != game_width * scale || static_cast<int>(h) != game_height * scale ||
  14.             force_bpp) && try_scaler(w, h) == false) {
  15. +#endif
  16.         // Try fallback to point scaler if it failed, if it doesn't work, we probably can't run
  17.         scaler = point;
  18.         try_scaler(w, h);
  19. @@ -801,8 +805,12 @@ bool Image_window::try_scaler(int w, int h) {
  20.         scaler = point;
  21.     }
  22.  
  23. +#if SDL_VERSION_ATLEAST(2, 0, 0)
  24. +   if (true) {
  25. +#else
  26.     if (game_width != inter_width || game_height != inter_height ||
  27.             w != game_width * scale || h != game_height * scale || force_bpp) {
  28. +#endif
  29.         const ScalerInfo *info;
  30.  
  31.         if (scaler < 0 || scaler >= NumScalers || scale == 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement