Skip to content

Commit f5431ba

Browse files
committed
[CONSOLE.CPL]
Fix setting default parameters. svn path=/trunk/; revision=62720
1 parent 9d33160 commit f5431ba

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

reactos/dll/cpl/console/console.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -296,22 +296,6 @@ InitApplet(HWND hWnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
296296
return 0;
297297
}
298298

299-
/* Check that we are really going to modify GUI terminal information... */
300-
if (pSharedInfo->TerminalInfo.Size != sizeof(GUI_CONSOLE_INFO) ||
301-
pSharedInfo->TerminalInfo.TermInfo == 0)
302-
{
303-
/* ... it's not the case, bail out */
304-
305-
/* Cleanup */
306-
HeapFree(GetProcessHeap(), 0, pConInfo);
307-
308-
/* Close the section */
309-
UnmapViewOfFile(pSharedInfo);
310-
CloseHandle(hSection);
311-
312-
return 0;
313-
}
314-
315299
/* Find the console window and whether we set the default parameters */
316300
pConInfo->hConsoleWindow = pSharedInfo->hConsoleWindow;
317301
pConInfo->ShowDefaultParams = pSharedInfo->ShowDefaultParams;
@@ -333,6 +317,13 @@ InitApplet(HWND hWnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
333317
* Copy the shared data into our allocated buffer, and
334318
* de-offsetize the address of terminal-specific information.
335319
*/
320+
321+
/* Check that we are really going to modify GUI terminal information */
322+
// FIXME: Do something clever, for example copy the UI-independent part
323+
// and init the UI-dependent part to some default values...
324+
ASSERT(pSharedInfo->TerminalInfo.Size == sizeof(GUI_CONSOLE_INFO));
325+
ASSERT(pSharedInfo->TerminalInfo.TermInfo);
326+
336327
RtlCopyMemory(pConInfo, pSharedInfo, sizeof(CONSOLE_PROPS) + sizeof(GUI_CONSOLE_INFO));
337328
pConInfo->TerminalInfo.TermInfo = (PVOID)((ULONG_PTR)pConInfo + (ULONG_PTR)pConInfo->TerminalInfo.TermInfo);
338329
}

0 commit comments

Comments
 (0)