mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Ignore '\r' in HalDisplayString().
svn path=/trunk/; revision=2499
This commit is contained in:
parent
25c85c7dfe
commit
fd4d47ccfc
1 changed files with 108 additions and 99 deletions
|
@ -1,10 +1,28 @@
|
||||||
/* $Id: display.c,v 1.1 2001/08/21 20:18:26 chorns Exp $
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: display.c,v 1.2 2002/01/10 01:01:27 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/hal/x86/display.c
|
* FILE: ntoskrnl/hal/x86/display.c
|
||||||
* PURPOSE: Blue screen display
|
* PURPOSE: Blue screen display
|
||||||
* PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
|
* PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* Created 08/10/99
|
* Created 08/10/99
|
||||||
*/
|
*/
|
||||||
|
@ -68,7 +86,7 @@ HalScrollDisplay (VOID)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ptr = VideoBuffer + SizeX;
|
ptr = VideoBuffer + SizeX;
|
||||||
RtlMoveMemory (VideoBuffer,
|
RtlMoveMemory(VideoBuffer,
|
||||||
ptr,
|
ptr,
|
||||||
SizeX * (SizeY - 1) * 2);
|
SizeX * (SizeY - 1) * 2);
|
||||||
|
|
||||||
|
@ -129,9 +147,9 @@ HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
SizeY = SizeY / ScanLines;
|
SizeY = SizeY / ScanLines;
|
||||||
|
|
||||||
#ifdef BOCHS_30ROWS
|
#ifdef BOCHS_30ROWS
|
||||||
SizeY=30;
|
SizeY=30;
|
||||||
#endif
|
#endif
|
||||||
HalClearDisplay ();
|
HalClearDisplay();
|
||||||
|
|
||||||
DisplayInitialized = TRUE;
|
DisplayInitialized = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +157,7 @@ SizeY=30;
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
HalResetDisplay (VOID)
|
HalResetDisplay(VOID)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Reset the display
|
* FUNCTION: Reset the display
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -155,18 +173,15 @@ HalResetDisplay (VOID)
|
||||||
if (HalResetDisplayParameters(SizeX, SizeY) == TRUE)
|
if (HalResetDisplayParameters(SizeX, SizeY) == TRUE)
|
||||||
{
|
{
|
||||||
HalOwnsDisplay = TRUE;
|
HalOwnsDisplay = TRUE;
|
||||||
HalClearDisplay ();
|
HalClearDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS *********************************************************/
|
/* PUBLIC FUNCTIONS *********************************************************/
|
||||||
|
|
||||||
VOID
|
VOID STDCALL
|
||||||
STDCALL
|
HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters)
|
||||||
HalAcquireDisplayOwnership (
|
|
||||||
IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters
|
|
||||||
)
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION:
|
* FUNCTION:
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -180,7 +195,7 @@ HalAcquireDisplayOwnership (
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
HalDisplayString (IN PCH String)
|
HalDisplayString(IN PCH String)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Switches the screen to HAL console mode (BSOD) if not there
|
* FUNCTION: Switches the screen to HAL console mode (BSOD) if not there
|
||||||
* already and displays a string
|
* already and displays a string
|
||||||
|
@ -225,7 +240,7 @@ HalDisplayString (IN PCH String)
|
||||||
CursorY++;
|
CursorY++;
|
||||||
CursorX = 0;
|
CursorX = 0;
|
||||||
}
|
}
|
||||||
else
|
else if (*pch != '\r')
|
||||||
{
|
{
|
||||||
HalPutCharacter (*pch);
|
HalPutCharacter (*pch);
|
||||||
CursorX++;
|
CursorX++;
|
||||||
|
@ -259,14 +274,11 @@ HalDisplayString (IN PCH String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID STDCALL
|
||||||
STDCALL
|
HalQueryDisplayParameters(OUT PULONG DispSizeX,
|
||||||
HalQueryDisplayParameters (
|
OUT PULONG DispSizeY,
|
||||||
PULONG DispSizeX,
|
OUT PULONG CursorPosX,
|
||||||
PULONG DispSizeY,
|
OUT PULONG CursorPosY)
|
||||||
PULONG CursorPosX,
|
|
||||||
PULONG CursorPosY
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (DispSizeX)
|
if (DispSizeX)
|
||||||
*DispSizeX = SizeX;
|
*DispSizeX = SizeX;
|
||||||
|
@ -279,12 +291,9 @@ HalQueryDisplayParameters (
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID STDCALL
|
||||||
STDCALL
|
HalSetDisplayParameters(IN ULONG CursorPosX,
|
||||||
HalSetDisplayParameters (
|
IN ULONG CursorPosY)
|
||||||
ULONG CursorPosX,
|
|
||||||
ULONG CursorPosY
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
CursorX = (CursorPosX < SizeX) ? CursorPosX : SizeX - 1;
|
CursorX = (CursorPosX < SizeX) ? CursorPosX : SizeX - 1;
|
||||||
CursorY = (CursorPosY < SizeY) ? CursorPosY : SizeY - 1;
|
CursorY = (CursorPosY < SizeY) ? CursorPosY : SizeY - 1;
|
||||||
|
|
Loading…
Reference in a new issue