A small changing to reduce size for ConSplitter module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4326 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2007-11-23 09:37:19 +00:00
parent b819abbb7f
commit 7a5064ce42

View File

@ -90,7 +90,7 @@ STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
0x10000, //AbsoluteMaxX 0x10000, //AbsoluteMaxX
0x10000, //AbsoluteMaxY 0x10000, //AbsoluteMaxY
0x10000, //AbsoluteMaxZ 0x10000, //AbsoluteMaxZ
0 //Attributes 0 //Attributes
}, },
0, 0,
(EFI_ABSOLUTE_POINTER_PROTOCOL **) NULL, (EFI_ABSOLUTE_POINTER_PROTOCOL **) NULL,
@ -117,6 +117,19 @@ STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
FALSE FALSE
}; };
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL gUgaDrawProtocolTemplate = {
ConSpliterUgaDrawGetMode,
ConSpliterUgaDrawSetMode,
ConSpliterUgaDrawBlt
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL gGraphicsOutputProtocolTemplate = {
ConSpliterGraphicsOutputQueryMode,
ConSpliterGraphicsOutputSetMode,
ConSpliterGraphicsOutputBlt,
NULL
};
STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = { STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE, TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE,
(EFI_HANDLE) NULL, (EFI_HANDLE) NULL,
@ -141,9 +154,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
FALSE, FALSE,
}, },
{ {
ConSpliterUgaDrawGetMode, NULL,
ConSpliterUgaDrawSetMode, NULL,
ConSpliterUgaDrawBlt NULL
}, },
0, 0,
0, 0,
@ -151,9 +164,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
0, 0,
(EFI_UGA_PIXEL *) NULL, (EFI_UGA_PIXEL *) NULL,
{ {
ConSpliterGraphicsOutputQueryMode, NULL,
ConSpliterGraphicsOutputSetMode, NULL,
ConSpliterGraphicsOutputBlt, NULL,
NULL NULL
}, },
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
@ -204,9 +217,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
FALSE, FALSE,
}, },
{ {
ConSpliterUgaDrawGetMode, NULL,
ConSpliterUgaDrawSetMode, NULL,
ConSpliterUgaDrawBlt NULL
}, },
0, 0,
0, 0,
@ -214,9 +227,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
0, 0,
(EFI_UGA_PIXEL *) NULL, (EFI_UGA_PIXEL *) NULL,
{ {
ConSpliterGraphicsOutputQueryMode, NULL,
ConSpliterGraphicsOutputSetMode, NULL,
ConSpliterGraphicsOutputBlt, NULL,
NULL NULL
}, },
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
@ -578,7 +591,7 @@ Returns:
// //
// Buffer for Simple Text Input Ex Protocol // Buffer for Simple Text Input Ex Protocol
// //
Status = ConSplitterGrowBuffer ( Status = ConSplitterGrowBuffer (
sizeof (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *), sizeof (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *),
&ConInPrivate->TextInExListCount, &ConInPrivate->TextInExListCount,
@ -597,7 +610,7 @@ Returns:
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
InitializeListHead (&ConInPrivate->NotifyList); InitializeListHead (&ConInPrivate->NotifyList);
// //
// Allocate Buffer and Create Event for Absolute Pointer and Simple Pointer Protocols // Allocate Buffer and Create Event for Absolute Pointer and Simple Pointer Protocols
@ -651,6 +664,17 @@ ConSplitterTextOutConstructor (
{ {
EFI_STATUS Status; EFI_STATUS Status;
//
// Copy protocols template
//
if (FeaturePcdGet (PcdConOutUgaSupport)) {
CopyMem (&ConOutPrivate->UgaDraw, &gUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));
}
if (FeaturePcdGet (PcdConOutGopSupport)) {
CopyMem (&ConOutPrivate->GraphicsOutput, &gGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
}
// //
// Initilize console output splitter's private data. // Initilize console output splitter's private data.
// //
@ -1072,7 +1096,7 @@ Returns:
} }
Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx); Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);
return Status; return Status;
} }
@ -1153,7 +1177,7 @@ Returns:
&gEfiAbsolutePointerProtocolGuid, &gEfiAbsolutePointerProtocolGuid,
(VOID **) &AbsolutePointer (VOID **) &AbsolutePointer
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
@ -1417,8 +1441,8 @@ Returns:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -3175,36 +3199,36 @@ Routine Description:
Arguments: Arguments:
RegsiteredData - A pointer to a buffer that is filled in with the keystroke RegsiteredData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was registered. state data for the key that was registered.
InputData - A pointer to a buffer that is filled in with the keystroke InputData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed. state data for the key that was pressed.
Returns: Returns:
TRUE - Key be pressed matches a registered key. TRUE - Key be pressed matches a registered key.
FLASE - Match failed. FLASE - Match failed.
--*/ --*/
{ {
ASSERT (RegsiteredData != NULL && InputData != NULL); ASSERT (RegsiteredData != NULL && InputData != NULL);
if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) || if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) { (RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
return FALSE; return FALSE;
} }
// //
// Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored. // Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored.
// //
if (RegsiteredData->KeyState.KeyShiftState != 0 && if (RegsiteredData->KeyState.KeyShiftState != 0 &&
RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) { RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) {
return FALSE; return FALSE;
} }
if (RegsiteredData->KeyState.KeyToggleState != 0 && if (RegsiteredData->KeyState.KeyToggleState != 0 &&
RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) { RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) {
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
@ -3230,7 +3254,7 @@ ConSplitterTextInResetEx (
Returns: Returns:
EFI_SUCCESS - The device was reset. EFI_SUCCESS - The device was reset.
EFI_DEVICE_ERROR - The device is not functioning properly and could EFI_DEVICE_ERROR - The device is not functioning properly and could
not be reset. not be reset.
--*/ --*/
@ -3270,20 +3294,20 @@ ConSplitterTextInReadKeyStrokeEx (
/*++ /*++
Routine Description: Routine Description:
Reads the next keystroke from the input device. The WaitForKey Event can Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call. be used to test for existance of a keystroke via WaitForEvent () call.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed. state data for the key that was pressed.
Returns: Returns:
EFI_SUCCESS - The keystroke information was returned. EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable. EFI_NOT_READY - There was no keystroke data availiable.
EFI_DEVICE_ERROR - The keystroke information was not returned due to EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors. hardware errors.
EFI_INVALID_PARAMETER - KeyData is NULL. EFI_INVALID_PARAMETER - KeyData is NULL.
--*/ --*/
{ {
@ -3292,7 +3316,7 @@ ConSplitterTextInReadKeyStrokeEx (
UINTN Index; UINTN Index;
EFI_KEY_DATA CurrentKeyData; EFI_KEY_DATA CurrentKeyData;
if (KeyData == NULL) { if (KeyData == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -3326,7 +3350,7 @@ ConSplitterTextInReadKeyStrokeEx (
} }
} }
return EFI_NOT_READY; return EFI_NOT_READY;
} }
EFI_STATUS EFI_STATUS
@ -3342,17 +3366,17 @@ ConSplitterTextInSetState (
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
state for the input device. state for the input device.
Returns: Returns:
EFI_SUCCESS - The device state was set successfully. EFI_SUCCESS - The device state was set successfully.
EFI_DEVICE_ERROR - The device is not functioning correctly and could EFI_DEVICE_ERROR - The device is not functioning correctly and could
not have the setting adjusted. not have the setting adjusted.
EFI_UNSUPPORTED - The device does not have the ability to set its state. EFI_UNSUPPORTED - The device does not have the ability to set its state.
EFI_INVALID_PARAMETER - KeyToggleState is NULL. EFI_INVALID_PARAMETER - KeyToggleState is NULL.
--*/ --*/
{ {
TEXT_IN_SPLITTER_PRIVATE_DATA *Private; TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status; EFI_STATUS Status;
@ -3378,7 +3402,7 @@ ConSplitterTextInSetState (
} }
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -3397,26 +3421,26 @@ ConSplitterTextInRegisterKeyNotify (
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke KeyData - A pointer to a buffer that is filled in with the keystroke
information data for the key that was pressed. information data for the key that was pressed.
KeyNotificationFunction - Points to the function to be called when the key KeyNotificationFunction - Points to the function to be called when the key
sequence is typed specified by KeyData. sequence is typed specified by KeyData.
NotifyHandle - Points to the unique handle assigned to the registered notification. NotifyHandle - Points to the unique handle assigned to the registered notification.
Returns: Returns:
EFI_SUCCESS - The notification function was registered successfully. EFI_SUCCESS - The notification function was registered successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures. EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL. EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
--*/ --*/
{ {
TEXT_IN_SPLITTER_PRIVATE_DATA *Private; TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status; EFI_STATUS Status;
UINTN Index; UINTN Index;
TEXT_IN_EX_SPLITTER_NOTIFY *NewNotify; TEXT_IN_EX_SPLITTER_NOTIFY *NewNotify;
LIST_ENTRY *Link; LIST_ENTRY *Link;
TEXT_IN_EX_SPLITTER_NOTIFY *CurrentNotify; TEXT_IN_EX_SPLITTER_NOTIFY *CurrentNotify;
if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) { if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -3425,7 +3449,7 @@ ConSplitterTextInRegisterKeyNotify (
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This); Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
// //
// if no physical console input device exists, // if no physical console input device exists,
// return EFI_SUCCESS directly. // return EFI_SUCCESS directly.
// //
if (Private->CurrentNumberOfExConsoles <= 0) { if (Private->CurrentNumberOfExConsoles <= 0) {
@ -3437,22 +3461,22 @@ ConSplitterTextInRegisterKeyNotify (
// //
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) { for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR ( CurrentNotify = CR (
Link, Link,
TEXT_IN_EX_SPLITTER_NOTIFY, TEXT_IN_EX_SPLITTER_NOTIFY,
NotifyEntry, NotifyEntry,
TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE
); );
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) { if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle; *NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
} }
// //
// Allocate resource to save the notification function // Allocate resource to save the notification function
// //
NewNotify = (TEXT_IN_EX_SPLITTER_NOTIFY *) AllocateZeroPool (sizeof (TEXT_IN_EX_SPLITTER_NOTIFY)); NewNotify = (TEXT_IN_EX_SPLITTER_NOTIFY *) AllocateZeroPool (sizeof (TEXT_IN_EX_SPLITTER_NOTIFY));
if (NewNotify == NULL) { if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
@ -3462,12 +3486,12 @@ ConSplitterTextInRegisterKeyNotify (
gBS->FreePool (NewNotify); gBS->FreePool (NewNotify);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE; NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction; NewNotify->KeyNotificationFn = KeyNotificationFunction;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData)); CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
// //
// Return the wrong status of registering key notify of // Return the wrong status of registering key notify of
// physical console input device if meet problems // physical console input device if meet problems
// //
for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) { for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) {
@ -3486,7 +3510,7 @@ ConSplitterTextInRegisterKeyNotify (
// //
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE // Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
// //
Status = gBS->InstallMultipleProtocolInterfaces ( Status = gBS->InstallMultipleProtocolInterfaces (
&NewNotify->NotifyHandle, &NewNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid, &gSimpleTextInExNotifyGuid,
@ -3496,11 +3520,11 @@ ConSplitterTextInRegisterKeyNotify (
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry); InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle; *NotifyHandle = NewNotify->NotifyHandle;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
EFI_STATUS EFI_STATUS
@ -3515,21 +3539,21 @@ ConSplitterTextInUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke. Remove a registered notification function from a particular keystroke.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered. NotificationHandle - The handle of the notification function being unregistered.
Returns: Returns:
EFI_SUCCESS - The notification function was unregistered successfully. EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid. EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
EFI_NOT_FOUND - Can not find the matching entry in database. EFI_NOT_FOUND - Can not find the matching entry in database.
--*/ --*/
{ {
TEXT_IN_SPLITTER_PRIVATE_DATA *Private; TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status; EFI_STATUS Status;
UINTN Index; UINTN Index;
TEXT_IN_EX_SPLITTER_NOTIFY *CurrentNotify; TEXT_IN_EX_SPLITTER_NOTIFY *CurrentNotify;
LIST_ENTRY *Link; LIST_ENTRY *Link;
if (NotificationHandle == NULL) { if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -3550,7 +3574,7 @@ ConSplitterTextInUnregisterKeyNotify (
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This); Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
// //
// if no physical console input device exists, // if no physical console input device exists,
// return EFI_SUCCESS directly. // return EFI_SUCCESS directly.
// //
if (Private->CurrentNumberOfExConsoles <= 0) { if (Private->CurrentNumberOfExConsoles <= 0) {
@ -3562,14 +3586,14 @@ ConSplitterTextInUnregisterKeyNotify (
if (CurrentNotify->NotifyHandle == NotificationHandle) { if (CurrentNotify->NotifyHandle == NotificationHandle) {
for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) { for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) {
Status = Private->TextInExList[Index]->UnregisterKeyNotify ( Status = Private->TextInExList[Index]->UnregisterKeyNotify (
Private->TextInExList[Index], Private->TextInExList[Index],
CurrentNotify->NotifyHandleList[Index] CurrentNotify->NotifyHandleList[Index]
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
} }
RemoveEntryList (&CurrentNotify->NotifyEntry); RemoveEntryList (&CurrentNotify->NotifyEntry);
Status = gBS->UninstallMultipleProtocolInterfaces ( Status = gBS->UninstallMultipleProtocolInterfaces (
CurrentNotify->NotifyHandle, CurrentNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid, &gSimpleTextInExNotifyGuid,
@ -3579,12 +3603,12 @@ ConSplitterTextInUnregisterKeyNotify (
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
gBS->FreePool (CurrentNotify->NotifyHandleList); gBS->FreePool (CurrentNotify->NotifyHandleList);
gBS->FreePool (CurrentNotify); gBS->FreePool (CurrentNotify);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
EFI_STATUS EFI_STATUS
@ -3833,9 +3857,9 @@ ConSplitterAbsolutePointerReset (
Returns: Returns:
EFI_SUCCESS - The device was reset. EFI_SUCCESS - The device was reset.
EFI_DEVICE_ERROR - The device is not functioning correctly and could EFI_DEVICE_ERROR - The device is not functioning correctly and could
not be reset. not be reset.
--*/ --*/
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -3846,7 +3870,7 @@ ConSplitterAbsolutePointerReset (
Private = TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS (This); Private = TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS (This);
Private->AbsoluteInputEventSignalState = FALSE; Private->AbsoluteInputEventSignalState = FALSE;
if (Private->CurrentNumberOfAbsolutePointers == 0) { if (Private->CurrentNumberOfAbsolutePointers == 0) {
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -3867,7 +3891,7 @@ ConSplitterAbsolutePointerReset (
} }
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterAbsolutePointerGetState ( ConSplitterAbsolutePointerGetState (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN OUT EFI_ABSOLUTE_POINTER_STATE *State IN OUT EFI_ABSOLUTE_POINTER_STATE *State
@ -3884,9 +3908,9 @@ ConSplitterAbsolutePointerGetState (
Returns: Returns:
EFI_SUCCESS - The state of the pointer device was returned in State.. EFI_SUCCESS - The state of the pointer device was returned in State..
EFI_NOT_READY - The state of the pointer device has not changed since the last call to EFI_NOT_READY - The state of the pointer device has not changed since the last call to
GetState(). GetState().
EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
device's current state. device's current state.
--*/ --*/
{ {
TEXT_IN_SPLITTER_PRIVATE_DATA *Private; TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@ -3910,7 +3934,7 @@ ConSplitterAbsolutePointerGetState (
State->CurrentY = 0; State->CurrentY = 0;
State->CurrentZ = 0; State->CurrentZ = 0;
State->ActiveButtons = 0; State->ActiveButtons = 0;
// //
// if no physical pointer device exists, return EFI_NOT_READY; // if no physical pointer device exists, return EFI_NOT_READY;
// if any physical pointer device has changed state, // if any physical pointer device has changed state,
@ -3939,7 +3963,7 @@ ConSplitterAbsolutePointerGetState (
if (!(Private->AbsolutePointerMode.AbsoluteMinZ == 0 && Private->AbsolutePointerMode.AbsoluteMaxZ == 0)) { if (!(Private->AbsolutePointerMode.AbsoluteMinZ == 0 && Private->AbsolutePointerMode.AbsoluteMaxZ == 0)) {
State->CurrentZ = CurrentState.CurrentZ; State->CurrentZ = CurrentState.CurrentZ;
} }
} else if (Status == EFI_DEVICE_ERROR) { } else if (Status == EFI_DEVICE_ERROR) {
ReturnStatus = EFI_DEVICE_ERROR; ReturnStatus = EFI_DEVICE_ERROR;
} }
@ -3985,7 +4009,7 @@ Returns:
} }
// //
// if AbsoluteInputEventSignalState is flagged before, // if AbsoluteInputEventSignalState is flagged before,
// and not cleared by Reset() or GetState(), signal it // and not cleared by Reset() or GetState(), signal it
// //
if (Private->AbsoluteInputEventSignalState) { if (Private->AbsoluteInputEventSignalState) {
@ -4486,7 +4510,7 @@ ConSplitterTextOutSetCursorPosition (
Private = TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This); Private = TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
TextOutModeMap = NULL; TextOutModeMap = NULL;
ModeNumber = Private->TextOutMode.Mode; ModeNumber = Private->TextOutMode.Mode;
// //
// Get current MaxColumn and MaxRow from intersection map // Get current MaxColumn and MaxRow from intersection map
// //
@ -4496,7 +4520,7 @@ ConSplitterTextOutSetCursorPosition (
} else { } else {
CurrentMode = ModeNumber; CurrentMode = ModeNumber;
} }
MaxColumn = Private->TextOutQueryData[CurrentMode].Columns; MaxColumn = Private->TextOutQueryData[CurrentMode].Columns;
MaxRow = Private->TextOutQueryData[CurrentMode].Rows; MaxRow = Private->TextOutQueryData[CurrentMode].Rows;