joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.81k stars 383 forks source link

Suppress redundant screen reports in log #5274

Closed maron2000 closed 1 week ago

maron2000 commented 2 weeks ago

DOSBox-X logs screen report such as when the window size is changed, however, the values of the log is identical in many cases, such as below.

LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'Win98base' (1280.000 x 800.000 pixels) at (0.000 x 0.000) (338.667 x 211.667 mm) (13.333 x 8.333 in) (96.000 x 96.000 DPI)

This PR suppress such log and logs only when a value is changed.