From 76d1058fc3af51960ddc8d4487c156bd0e39809a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 20 Jun 2003 13:04:09 +0000 Subject: [PATCH] Map video memory based on actual size of screen svn path=/trunk/; revision=4932 --- reactos/drivers/dd/blue/blue.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reactos/drivers/dd/blue/blue.c b/reactos/drivers/dd/blue/blue.c index 707a5c58959..dc2f1f87982 100644 --- a/reactos/drivers/dd/blue/blue.c +++ b/reactos/drivers/dd/blue/blue.c @@ -1,4 +1,4 @@ -/* $Id: blue.c,v 1.37 2003/03/21 21:09:40 hbirr Exp $ +/* $Id: blue.c,v 1.38 2003/06/20 13:04:09 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,7 +23,6 @@ /* DEFINITIONS ***************************************************************/ #define VIDMEM_BASE 0xb8000 -#define VIDMEM_SIZE 0x2000 #define CRTC_COMMAND ((PUCHAR)0x3d4) #define CRTC_DATA ((PUCHAR)0x3d5) @@ -79,11 +78,6 @@ ScrCreate(PDEVICE_OBJECT DeviceObject, DeviceExtension = DeviceObject->DeviceExtension; - /* get pointer to video memory */ - BaseAddress.QuadPart = VIDMEM_BASE; - DeviceExtension->VideoMemory = - (PBYTE)MmMapIoSpace (BaseAddress, VIDMEM_SIZE, FALSE); - /* disable interrupts */ __asm__("cli\n\t"); @@ -130,6 +124,11 @@ ScrCreate(PDEVICE_OBJECT DeviceObject, DeviceExtension->Rows, DeviceExtension->ScanLines); + /* get pointer to video memory */ + BaseAddress.QuadPart = VIDMEM_BASE; + DeviceExtension->VideoMemory = + (PBYTE)MmMapIoSpace (BaseAddress, DeviceExtension->Rows * DeviceExtension->Columns * 2, FALSE); + DeviceExtension->CursorSize = 5; /* FIXME: value correct?? */ DeviceExtension->CursorVisible = TRUE;