1
0
Fork 0

Work with ints when dealing with abs. Fixes a warning.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4122
This commit is contained in:
Peter Veenstra 2018-06-25 15:30:44 +00:00
parent 3ddf3056e8
commit 50d6368b14

View file

@ -242,7 +242,7 @@ void vga_write_p3d5(Bitu port,Bitu val,Bitu iolen) {
break;
case 0x12: /* Vertical Display End Register */
if (val!=crtc(vertical_display_end)) {
if (abs((Bits)val-(Bits)crtc(vertical_display_end))<3) {
if (abs(static_cast<int>((Bits)val-(Bits)crtc(vertical_display_end)))<3) {
// delay small vde changes a bit to avoid screen resizing
// if they are reverted in a short timeframe
PIC_RemoveEvents(VGA_SetupDrawing);