From d73939fb4094653e89c9270332f6cbcaa183b0f2 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 6 Dec 2019 12:33:19 +0200 Subject: [PATCH] fixed div/0 --- src/dos/vbe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dos/vbe.c b/src/dos/vbe.c index f4fabdf..fd894fe 100644 --- a/src/dos/vbe.c +++ b/src/dos/vbe.c @@ -222,6 +222,8 @@ int vbe_setmode(uint16_t mode) if((regs.eax & 0xffff) != 0x4f) { return -1; } + + cur_pitch = vbe_getpitch(); return 0; } @@ -250,6 +252,8 @@ int vbe_setmode_crtc(uint16_t mode, struct vbe_crtc_info *crtc) if((regs.eax & 0xffff) != 0x4f) { return -1; } + + cur_pitch = vbe_getpitch(); return 0; } @@ -378,6 +382,7 @@ int vbe_setscanlen(int len_pix) return -1; } + cur_pitch = vbe_getpitch(); return regs.ecx; } @@ -432,8 +437,8 @@ enum { SDISP_GET = 0x01, SDISP_ALTSET = 0x02, SDISP_SET_STEREO = 0x03, - SDISP_GETSCHED = 0x04, - SDISP_STEREO_ON = 0x05, + SDISP_GETSCHED = 0x04, + SDISP_STEREO_ON = 0x05, SDISP_STEREO_OFF = 0x06, SDISP_SET_VBLANK = 0x80, SDISP_ALTSET_VBLANK = 0x82, -- 1.7.10.4