In case the framebuffer size matches one of the cbvga video modes
just use that mode number instead of 0x140.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
dprintf(3, "Removing mode %x\n", GET_GLOBAL(cbmode_g->mode));
SET_VGA(cbmode_g->mode, 0xffff);
}
+ if ((GET_GLOBAL(cbmode_g->info.height) == ylines)
+ && (GET_GLOBAL(cbmode_g->info.width) == xlines)
+ && (GET_GLOBAL(cbmode_g->info.depth) == bpp)) {
+ SET_VGA(CBmode, GET_GLOBAL(cbmode_g->mode));
+ }
}
}