]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not set custom limits twice.
authorToni Wilen <twilen@winuae.net>
Sun, 1 Aug 2021 17:40:39 +0000 (20:40 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 1 Aug 2021 17:40:39 +0000 (20:40 +0300)
od-win32/win32_scaler.cpp

index 55328ebc0d6d01c8828dcf756409bf008707a704..7acc7ac7cb337de4ac57e0b3323d3624a5c50352 100644 (file)
@@ -367,9 +367,11 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int
                                        cw -= 40 << currprefs.gfx_resolution;
                                        ch -= 20 << currprefs.gfx_vresolution;
                                }
-                               set_custom_limits (cw, ch, cx, cy);
-                               store_custom_limits (cw, ch, cx, cy);
-                               scl = true;
+                               if (scalemode != AUTOSCALE_INTEGER && scalemode != AUTOSCALE_INTEGER_AUTOSCALE) {
+                                       set_custom_limits (cw, ch, cx, cy);
+                                       store_custom_limits (cw, ch, cx, cy);
+                                       scl = true;
+                               }
                        }
 
                        if (scalemode == AUTOSCALE_INTEGER || scalemode == AUTOSCALE_INTEGER_AUTOSCALE) {
@@ -391,12 +393,14 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int
                                        if (ok) {
                                                set_custom_limits(cw, ch, cx, cy);
                                                store_custom_limits(cw, ch, cx, cy);
+                                               scl = true;
                                        }
                                }
                                if (scalemode == AUTOSCALE_INTEGER || ok == false) {
                                        getmanualpos(monid, &cx, &cy, &cw, &ch);
                                        set_custom_limits(cw, ch, cx, cy);
                                        store_custom_limits(cw, ch, cx, cy);
+                                       scl = true;
                                }
 
 #if 0