From e9cb70dae0a85fcd116d7ffac73d1322ec282a94 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 18 Nov 2003 18:38:48 +0000 Subject: [PATCH] Reset available offscreen segment save function pointer. (Not a functional change, just cleaning up a bit) Reset the screen->memory_base value when frame buffer is remapped. This makes sure new off-screen allocations point at the newly mapped region rather than the old (now unmapped) region. --- hw/kdrive/src/koffscreen.c | 1 + hw/kdrive/vesa/vesa.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/kdrive/src/koffscreen.c b/hw/kdrive/src/koffscreen.c index 61cf37a62..5f5c92f11 100644 --- a/hw/kdrive/src/koffscreen.c +++ b/hw/kdrive/src/koffscreen.c @@ -259,6 +259,7 @@ KdOffscreenFree (ScreenPtr pScreen, KdOffscreenArea *area) KdOffscreenValidate (pScreen); area->state = KdOffscreenAvail; + area->save = 0; /* * Find previous area diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c index 5e6f5d470..e0e8a78eb 100644 --- a/hw/kdrive/vesa/vesa.c +++ b/hw/kdrive/vesa/vesa.c @@ -1360,6 +1360,7 @@ vesaEnable(ScreenPtr pScreen) if (!pscr->fb) return FALSE; screen->fb[0].frameBuffer = (CARD8 *)(pscr->fb); + screen->memory_base = pscr->fb; /* * Set frame buffer mapping */