Author: hbelusca
Date: Sat Mar 9 01:39:49 2013
New Revision: 58448
URL:
http://svn.reactos.org/svn/reactos?rev=58448&view=rev
Log:
[CONSRV]
Fix the initialization of screen buffers (concerning the cursor size).
[KERNEL32]
Fix almost all of the console winetests. Only 26 tests remain to be fixed, concerning
principally WriteConsoleInputA/W and GetNumberOfConsoleInputEvents.
Modified:
branches/ros-csrss/dll/win32/kernel32/client/console/console.c
branches/ros-csrss/dll/win32/kernel32/client/console/readwrite.c
branches/ros-csrss/win32ss/user/consrv/coninput.c
branches/ros-csrss/win32ss/user/consrv/conio.h
branches/ros-csrss/win32ss/user/consrv/conoutput.c
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/consrv/guiconsole.c
branches/ros-csrss/win32ss/user/consrv/settings.c
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1]
(original)
+++ branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sat Mar 9
01:39:49 2013
@@ -776,7 +776,7 @@
return Ppb->StandardError;
}
- SetLastError(ERROR_INVALID_PARAMETER);
+ SetLastError(ERROR_INVALID_HANDLE);
return INVALID_HANDLE_VALUE;
}
@@ -1050,14 +1050,10 @@
{
NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
-
- if (lpNumberOfEvents == NULL)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- ApiMessage.Data.GetNumInputEventsRequest.InputHandle = hConsoleInput;
+ PCONSOLE_GETNUMINPUTEVENTS GetNumInputEventsRequest =
&ApiMessage.Data.GetNumInputEventsRequest;
+
+ GetNumInputEventsRequest->InputHandle = hConsoleInput;
+ GetNumInputEventsRequest->NumInputEvents = 0;
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
@@ -1069,7 +1065,13 @@
return FALSE;
}
- *lpNumberOfEvents = ApiMessage.Data.GetNumInputEventsRequest.NumInputEvents;
+ if (lpNumberOfEvents == NULL)
+ {
+ SetLastError(ERROR_INVALID_ACCESS);
+ return FALSE;
+ }
+
+ *lpNumberOfEvents = GetNumInputEventsRequest->NumInputEvents;
return TRUE;
}
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/readwrite.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1]
(original)
+++ branches/ros-csrss/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1] Sat Mar
9 01:39:49 2013
@@ -264,7 +264,7 @@
sizeof(CONSOLE_READOUTPUT));
DPRINT("Server returned: %x\n", ApiMessage.Status);
- /* Check for success*/
+ /* Check for success */
if (NT_SUCCESS(ApiMessage.Status))
{
/* Copy into the buffer */
@@ -305,6 +305,7 @@
LPDWORD lpNumberOfCodesRead)
{
NTSTATUS Status;
+ BOOL bRet = TRUE;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_READOUTPUTCODE ReadOutputCodeRequest =
&ApiMessage.Data.ReadOutputCodeRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
@@ -353,28 +354,38 @@
ReadOutputCodeRequest->NumCodesToRead = nLength;
+ /* Call the server */
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
CaptureBuffer,
CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepReadConsoleOutputString),
sizeof(CONSOLE_READOUTPUTCODE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
- {
- BaseSetLastNTError(Status);
- CsrFreeCaptureBuffer(CaptureBuffer);
- return FALSE;
- }
-
- BytesRead = ReadOutputCodeRequest->CodesRead * CodeSize;
- memcpy(pCode, ReadOutputCodeRequest->pCode.pCode, BytesRead);
-
- ReadOutputCodeRequest->ReadCoord = ReadOutputCodeRequest->EndCoord;
-
- if (lpNumberOfCodesRead != NULL)
- *lpNumberOfCodesRead = ReadOutputCodeRequest->CodesRead;
+
+ /* Check for success */
+ if (NT_SUCCESS(Status) || NT_SUCCESS(Status = ApiMessage.Status))
+ {
+ BytesRead = ReadOutputCodeRequest->CodesRead * CodeSize;
+ memcpy(pCode, ReadOutputCodeRequest->pCode.pCode, BytesRead);
+
+ // ReadOutputCodeRequest->ReadCoord = ReadOutputCodeRequest->EndCoord;
+
+ if (lpNumberOfCodesRead != NULL)
+ *lpNumberOfCodesRead = ReadOutputCodeRequest->CodesRead;
+
+ bRet = TRUE;
+ }
+ else
+ {
+ if (lpNumberOfCodesRead != NULL)
+ *lpNumberOfCodesRead = 0;
+
+ /* Error out */
+ BaseSetLastNTError(Status /* ApiMessage.Status */);
+ bRet = FALSE;
+ }
CsrFreeCaptureBuffer(CaptureBuffer);
- return TRUE;
+ return bRet;
}
@@ -392,6 +403,7 @@
BOOL bUnicode)
{
NTSTATUS Status;
+ BOOL bRet = TRUE;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_WRITECONSOLE WriteConsoleRequest =
&ApiMessage.Data.WriteConsoleRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
@@ -423,48 +435,56 @@
WriteConsoleRequest->OutputHandle = hConsoleOutput;
WriteConsoleRequest->Unicode = bUnicode;
- // while (nNumberOfCharsToWrite > 0)
- {
- //// nChars = (USHORT)min(nNumberOfCharsToWrite, CSRSS_MAX_WRITE_CONSOLE /
CharSize);
- // nChars = nNumberOfCharsToWrite;
- // WriteConsoleRequest->NrCharactersToWrite = nChars;
-
- // SizeBytes = nChars * CharSize;
-
- // memcpy(WriteConsoleRequest->Buffer, lpBuffer, SizeBytes);
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- CaptureBuffer,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepWriteConsole),
- sizeof(CONSOLE_WRITECONSOLE));
+ // while (nNumberOfCharsToWrite > 0) {
+ //// nChars = (USHORT)min(nNumberOfCharsToWrite, CSRSS_MAX_WRITE_CONSOLE /
CharSize);
+ // nChars = nNumberOfCharsToWrite;
+ // WriteConsoleRequest->NrCharactersToWrite = nChars;
+
+ // SizeBytes = nChars * CharSize;
+
+ // memcpy(WriteConsoleRequest->Buffer, lpBuffer, SizeBytes);
+
+ /* Call the server */
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ CaptureBuffer,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepWriteConsole),
+ sizeof(CONSOLE_WRITECONSOLE));
/** FIXME: Added in 47359 for pausing
- if (Status == STATUS_PENDING)
- {
- WaitForSingleObject(WriteConsoleRequest->UnpauseEvent, INFINITE);
- CloseHandle(WriteConsoleRequest->UnpauseEvent);
- continue;
- }
+ if (Status == STATUS_PENDING)
+ {
+ WaitForSingleObject(WriteConsoleRequest->UnpauseEvent, INFINITE);
+ CloseHandle(WriteConsoleRequest->UnpauseEvent);
+ continue;
+ }
**/
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
- {
- CsrFreeCaptureBuffer(CaptureBuffer);
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
+ /* Check for success */
+ if (NT_SUCCESS(Status) || NT_SUCCESS(Status = ApiMessage.Status))
+ {
// nNumberOfCharsToWrite -= nChars;
// lpBuffer = (PVOID)((ULONG_PTR)lpBuffer + (ULONG_PTR)SizeBytes);
// Written += WriteConsoleRequest->NrCharactersWritten;
- }
-
- if (lpNumberOfCharsWritten != NULL)
- // *lpNumberOfCharsWritten = Written;
- *lpNumberOfCharsWritten = WriteConsoleRequest->NrCharactersWritten;
+ // }
+
+ if (lpNumberOfCharsWritten != NULL)
+ // *lpNumberOfCharsWritten = Written;
+ *lpNumberOfCharsWritten = WriteConsoleRequest->NrCharactersWritten;
+
+ bRet = TRUE;
+ }
+ else
+ {
+ if (lpNumberOfCharsWritten != NULL)
+ *lpNumberOfCharsWritten = 0;
+
+ /* Error out */
+ BaseSetLastNTError(Status /* ApiMessage.Status */);
+ bRet = FALSE;
+ }
CsrFreeCaptureBuffer(CaptureBuffer);
- return TRUE;
+ return bRet;
}
@@ -518,7 +538,7 @@
sizeof(CONSOLE_WRITEINPUT));
DPRINT("Server returned: %x\n", ApiMessage.Status);
- /* Check for success*/
+ /* Check for success */
if (NT_SUCCESS(ApiMessage.Status))
{
/* Return the number of events read */
@@ -597,7 +617,7 @@
sizeof(CONSOLE_WRITEOUTPUT));
DPRINT("Server returned: %x\n", ApiMessage.Status);
- /* Check for success*/
+ /* Check for success */
if (!NT_SUCCESS(ApiMessage.Status))
{
/* Error out */
@@ -626,6 +646,7 @@
LPDWORD lpNumberOfCodesWritten)
{
NTSTATUS Status;
+ BOOL bRet = TRUE;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_WRITEOUTPUTCODE WriteOutputCodeRequest =
&ApiMessage.Data.WriteOutputCodeRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
@@ -685,44 +706,46 @@
WriteOutputCodeRequest->CodeType = CodeType;
WriteOutputCodeRequest->Coord = dwWriteCoord;
- /**
- ** TODO: HACK: Surely it has to go into CONSRV !!
- **/
- // while (nLength > 0)
- {
- // DWORD BytesWrite;
-
- WriteOutputCodeRequest->Length = nLength; // (WORD)min(nLength, nChars);
- // BytesWrite = WriteOutputCodeRequest->Length * CodeSize;
-
- // memcpy(WriteOutputCodeRequest->pCode.pCode, pCode, BytesWrite);
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- CaptureBuffer,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepWriteConsoleOutputString),
- sizeof(CONSOLE_WRITEOUTPUTCODE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
- {
- CsrFreeCaptureBuffer(CaptureBuffer);
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
+ WriteOutputCodeRequest->Length = nLength; // (WORD)min(nLength, nChars);
+ // BytesWrite = WriteOutputCodeRequest->Length * CodeSize;
+
+ // memcpy(WriteOutputCodeRequest->pCode.pCode, pCode, BytesWrite);
+
+ /* Call the server */
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ CaptureBuffer,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepWriteConsoleOutputString),
+ sizeof(CONSOLE_WRITEOUTPUTCODE));
+
+ /* Check for success */
+ if (NT_SUCCESS(Status) || NT_SUCCESS(Status = ApiMessage.Status))
+ {
// nLength -= WriteOutputCodeRequest->NrCharactersWritten;
// pCode = (PVOID)((ULONG_PTR)pCode +
/*(ULONG_PTR)(*/WriteOutputCodeRequest->NrCharactersWritten * CodeSize/*)*/);
// Written += WriteOutputCodeRequest->NrCharactersWritten;
- WriteOutputCodeRequest->Coord = WriteOutputCodeRequest->EndCoord;
- }
-
- if (lpNumberOfCodesWritten != NULL)
- // *lpNumberOfCodesWritten = Written;
- // *lpNumberOfCodesWritten = WriteOutputCodeRequest->NrCharactersWritten;
- *lpNumberOfCodesWritten = WriteOutputCodeRequest->Length;
+ // WriteOutputCodeRequest->Coord = WriteOutputCodeRequest->EndCoord;
+
+ if (lpNumberOfCodesWritten != NULL)
+ // *lpNumberOfCodesWritten = Written;
+ // *lpNumberOfCodesWritten = WriteOutputCodeRequest->NrCharactersWritten;
+ *lpNumberOfCodesWritten = WriteOutputCodeRequest->Length;
+
+ bRet = TRUE;
+ }
+ else
+ {
+ if (lpNumberOfCodesWritten != NULL)
+ *lpNumberOfCodesWritten = 0;
+
+ /* Error out */
+ BaseSetLastNTError(Status /* ApiMessage.Status */);
+ bRet = FALSE;
+ }
CsrFreeCaptureBuffer(CaptureBuffer);
- return TRUE;
+ return bRet;
}
@@ -761,24 +784,33 @@
return FALSE;
}
+ /* Set up the data to send to the Console Server */
FillOutputRequest->Coord = dwWriteCoord;
FillOutputRequest->Length = nLength;
+ /* Call the server */
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepFillConsoleOutput),
sizeof(CONSOLE_FILLOUTPUTCODE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
- {
+
+ /* Check for success */
+ if (NT_SUCCESS(ApiMessage.Status))
+ {
+ if (lpNumberOfCodesWritten != NULL)
+ *lpNumberOfCodesWritten = FillOutputRequest->Length;
+ // *lpNumberOfCodesWritten =
Request.Data.FillOutputRequest.NrCharactersWritten;
+
+ return TRUE;
+ }
+ else
+ {
+ if (lpNumberOfCodesWritten != NULL)
+ *lpNumberOfCodesWritten = 0;
+
BaseSetLastNTError(Status);
return FALSE;
}
-
- if (lpNumberOfCodesWritten)
- *lpNumberOfCodesWritten = FillOutputRequest->Length;
- // *lpNumberOfCodesWritten = Request.Data.FillOutputRequest.NrCharactersWritten;
-
- return TRUE;
}
Modified: branches/ros-csrss/win32ss/user/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] Sat Mar 9 01:39:49
2013
@@ -857,7 +857,7 @@
if (!NT_SUCCESS(Status)) return Status;
CurrentInput = InputBuffer->InputEvents.Flink;
- NumEvents = 0;
+ /* GetNumInputEventsRequest->NumInputEvents = */ NumEvents = 0;
/* If there are any events ... */
while (CurrentInput != &InputBuffer->InputEvents)
Modified: branches/ros-csrss/win32ss/user/consrv/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] Sat Mar 9 01:39:49 2013
@@ -275,7 +275,9 @@
OUT PCONSOLE_SCREEN_BUFFER* Buffer,
IN COORD ScreenBufferSize,
IN USHORT ScreenAttrib,
- IN USHORT PopupAttrib);
+ IN USHORT PopupAttrib,
+ IN BOOLEAN IsCursorVisible,
+ IN ULONG CursorSize);
VOID WINAPI ConioDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
DWORD FASTCALL ConioEffectiveCursorSize(PCONSOLE Console, DWORD Scale);
Modified: branches/ros-csrss/win32ss/user/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] Sat Mar 9 01:39:49
2013
@@ -64,7 +64,9 @@
OUT PCONSOLE_SCREEN_BUFFER* Buffer,
IN COORD ScreenBufferSize,
IN USHORT ScreenAttrib,
- IN USHORT PopupAttrib)
+ IN USHORT PopupAttrib,
+ IN BOOLEAN IsCursorVisible,
+ IN ULONG CursorSize)
{
if (Console == NULL || Buffer == NULL)
return STATUS_INVALID_PARAMETER;
@@ -91,9 +93,8 @@
(*Buffer)->ShowY = 0;
(*Buffer)->VirtualY = 0;
- // FIXME: !!
- (*Buffer)->CursorInfo.bVisible = TRUE;
- // (*Buffer)->CursorInfo.dwSize = ConsoleInfo->CursorSize;
+ (*Buffer)->CursorInfo.bVisible = (IsCursorVisible && (CursorSize >
0));
+ (*Buffer)->CursorInfo.dwSize = min(max(CursorSize, 1), 100);
(*Buffer)->ScreenDefaultAttrib = ScreenAttrib;
(*Buffer)->PopupDefaultAttrib = PopupAttrib;
@@ -1035,8 +1036,8 @@
ConioDrawRegion(Console, &UpdateRect);
}
- WriteOutputCodeRequest->EndCoord.X = X;
- WriteOutputCodeRequest->EndCoord.Y = (Y + Buff->ScreenBufferSize.Y -
Buff->VirtualY) % Buff->ScreenBufferSize.Y;
+ // WriteOutputCodeRequest->EndCoord.X = X;
+ // WriteOutputCodeRequest->EndCoord.Y = (Y + Buff->ScreenBufferSize.Y -
Buff->VirtualY) % Buff->ScreenBufferSize.Y;
}
if (tmpString)
@@ -1269,9 +1270,11 @@
PCONSOLE Console;
PCONSOLE_SCREEN_BUFFER Buff;
- COORD ScreenBufferSize = (COORD){80, 25};
- USHORT ScreenAttrib = DEFAULT_SCREEN_ATTRIB;
- USHORT PopupAttrib = DEFAULT_POPUP_ATTRIB;
+ COORD ScreenBufferSize = (COORD){80, 25};
+ USHORT ScreenAttrib = DEFAULT_SCREEN_ATTRIB;
+ USHORT PopupAttrib = DEFAULT_POPUP_ATTRIB;
+ BOOLEAN IsCursorVisible = TRUE;
+ ULONG CursorSize = CSR_DEFAULT_CURSOR_SIZE;
DPRINT("SrvCreateConsoleScreenBuffer\n");
@@ -1292,20 +1295,18 @@
ScreenAttrib = Console->ActiveBuffer->ScreenDefaultAttrib;
PopupAttrib = Console->ActiveBuffer->PopupDefaultAttrib;
- // Buff->CursorInfo.bVisible =
Console->ActiveBuffer->CursorInfo.bVisible;
- // Buff->CursorInfo.dwSize = Console->ActiveBuffer->CursorInfo.dwSize;
- }
- // else
- // {
- // Buff->CursorInfo.bVisible = TRUE;
- // Buff->CursorInfo.dwSize = CSR_DEFAULT_CURSOR_SIZE;
- // }
+
+ IsCursorVisible = Console->ActiveBuffer->CursorInfo.bVisible;
+ CursorSize = Console->ActiveBuffer->CursorInfo.dwSize;
+ }
Status = ConSrvCreateScreenBuffer(Console,
&Buff,
ScreenBufferSize,
ScreenAttrib,
- PopupAttrib);
+ PopupAttrib,
+ IsCursorVisible,
+ CursorSize);
if (NT_SUCCESS(Status))
{
Status = ConSrvInsertObject(ProcessData,
Modified: branches/ros-csrss/win32ss/user/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] Sat Mar 9 01:39:49
2013
@@ -365,7 +365,9 @@
&NewBuffer,
ConsoleInfo.ScreenBufferSize,
ConsoleInfo.ScreenAttrib,
- ConsoleInfo.PopupAttrib);
+ ConsoleInfo.PopupAttrib,
+ TRUE,
+ ConsoleInfo.CursorSize);
if (!NT_SUCCESS(Status))
{
DPRINT1("ConSrvCreateScreenBuffer: failed, Status = 0x%08lx\n",
Status);
Modified: branches/ros-csrss/win32ss/user/consrv/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/g…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] Sat Mar 9 01:39:49
2013
@@ -464,7 +464,8 @@
memcpy(Console->Colors, pConInfo->ci.Colors, sizeof(s_Colors)); // FIXME:
Possible buffer overflow if s_colors is bigger than pConInfo->Colors.
/* Apply cursor size */
- ActiveBuffer->CursorInfo.dwSize = min(max(pConInfo->ci.CursorSize, 1), 100);
+ ActiveBuffer->CursorInfo.bVisible = (pConInfo->ci.CursorSize > 0);
+ ActiveBuffer->CursorInfo.dwSize = min(max(pConInfo->ci.CursorSize, 1), 100);
if (pConInfo->ci.ConsoleSize.X != Console->Size.X ||
pConInfo->ci.ConsoleSize.Y != Console->Size.Y)
Modified: branches/ros-csrss/win32ss/user/consrv/settings.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/settings.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/settings.c [iso-8859-1] Sat Mar 9 01:39:49
2013
@@ -446,7 +446,7 @@
ConsoleInfo->CursorBlinkOn;
ConsoleInfo->ForceCursorOff;
- ConsoleInfo->CursorSize = CSR_DEFAULT_CURSOR_SIZE; // 0; #define SMALL_SIZE 25 //
large enough to be one pixel on a six pixel font
+ ConsoleInfo->CursorSize = CSR_DEFAULT_CURSOR_SIZE; // #define SMALL_SIZE 25
ConsoleInfo->ScreenAttrib = DEFAULT_SCREEN_ATTRIB;
ConsoleInfo->PopupAttrib = DEFAULT_POPUP_ATTRIB;
@@ -473,13 +473,6 @@
ConsoleInfo->u.GuiInfo.AutoPosition = TRUE;
ConsoleInfo->u.GuiInfo.WindowOrigin = (POINT){0, 0};
- // if (Console->ActiveBuffer)
- // {
- // Console->ActiveBuffer->ScreenBufferSize.X = 80;
- // Console->ActiveBuffer->ScreenBufferSize.Y = 300;
- // Console->ActiveBuffer->CursorInfo.bVisible = TRUE;
- // }
-
/*
* 2. Overwrite them with the ones stored in HKCU\Console.
* If the HKCU\Console key doesn't exist, create it