X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vgasrc%2Fvbe.c;h=daf8c514fac43bf09389f107aa6533d9de0dd122;hb=34203cdf8a89c747e221005850a4558252235360;hp=8256cae4ce91f2564044a8f6ebcff6a80e2ae574;hpb=c4a0b976c06837636533d561c59d22feb03baec3;p=seabios.git diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c index 8256cae..daf8c51 100644 --- a/vgasrc/vbe.c +++ b/vgasrc/vbe.c @@ -39,7 +39,8 @@ vbe_104f00(struct bregs *regs) SET_FARVAR(seg, info->capabilities, 0x1); /* 8BIT DAC */ /* We generate our mode list in the reserved field of the info block */ - SET_FARVAR(seg, info->video_mode, SEGOFF(seg, regs->di + 34)); + u16 *destmode = (void*)info->reserved; + SET_FARVAR(seg, info->video_mode, SEGOFF(seg, (u32)destmode)); /* Total memory (in 64 blocks) */ SET_FARVAR(seg, info->total_memory, bochsvga_total_mem()); @@ -52,7 +53,8 @@ vbe_104f00(struct bregs *regs) SEGOFF(get_global_seg(), (u32)VBE_REVISION_STRING)); /* Fill list of modes */ - bochsvga_list_modes(seg, regs->di + 32); + u16 *last = (void*)&info->reserved[sizeof(info->reserved)]; + vgahw_list_modes(seg, destmode, last - 1); regs->al = regs->ah; /* 0x4F, Function supported */ regs->ah = 0x0; /* 0x0, Function call successful */