mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Was reporting geometry backwards, and needed to add a raw output mode
svn path=/trunk/; revision=1127
This commit is contained in:
parent
6ac6c50282
commit
4f6c860da3
1 changed files with 85 additions and 78 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: blue.c,v 1.20 2000/02/24 13:16:40 ekohl Exp $
|
||||
/* $Id: blue.c,v 1.21 2000/04/23 17:42:57 phreak Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -157,15 +157,15 @@ NTSTATUS
|
|||
ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation (Irp);
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
|
||||
NTSTATUS Status;
|
||||
char *pch = Irp->UserBuffer;
|
||||
char *vidmem;
|
||||
int i, j, offset;
|
||||
int cursorx, cursory;
|
||||
int rows, columns;
|
||||
int processed = DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT;
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
vidmem = DeviceExtension->VideoMemory;
|
||||
rows = DeviceExtension->Rows;
|
||||
columns = DeviceExtension->Columns;
|
||||
|
@ -178,6 +178,13 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
cursory = offset / columns;
|
||||
cursorx = offset % columns;
|
||||
|
||||
if( processed == 0 )
|
||||
{
|
||||
/* raw output mode */
|
||||
memcpy( &vidmem[(cursorx * 2) + (cursory * columns * 2)], pch, stk->Parameters.Write.Length );
|
||||
offset += (stk->Parameters.Write.Length / 2);
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < stk->Parameters.Write.Length; i++, pch++)
|
||||
{
|
||||
switch (*pch)
|
||||
|
@ -254,7 +261,7 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
|
||||
/* Set the cursor position */
|
||||
offset = (cursory * columns) + cursorx;
|
||||
|
||||
}
|
||||
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
|
||||
WRITE_PORT_UCHAR (CRTC_DATA, offset);
|
||||
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
|
||||
|
@ -296,8 +303,8 @@ ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
offset += (READ_PORT_UCHAR (CRTC_DATA) << 8);
|
||||
__asm__("sti\n\t");
|
||||
|
||||
pcsbi->dwSize.X = rows;
|
||||
pcsbi->dwSize.Y = columns;
|
||||
pcsbi->dwSize.X = columns;
|
||||
pcsbi->dwSize.Y = rows;
|
||||
|
||||
pcsbi->dwCursorPosition.X = (SHORT)(offset % columns);
|
||||
pcsbi->dwCursorPosition.Y = (SHORT)(offset / columns);
|
||||
|
|
Loading…
Reference in a new issue