@@ -296,22 +296,6 @@ InitApplet(HWND hWnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
296
296
return 0 ;
297
297
}
298
298
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
-
315
299
/* Find the console window and whether we set the default parameters */
316
300
pConInfo -> hConsoleWindow = pSharedInfo -> hConsoleWindow ;
317
301
pConInfo -> ShowDefaultParams = pSharedInfo -> ShowDefaultParams ;
@@ -333,6 +317,13 @@ InitApplet(HWND hWnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
333
317
* Copy the shared data into our allocated buffer, and
334
318
* de-offsetize the address of terminal-specific information.
335
319
*/
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
+
336
327
RtlCopyMemory (pConInfo , pSharedInfo , sizeof (CONSOLE_PROPS ) + sizeof (GUI_CONSOLE_INFO ));
337
328
pConInfo -> TerminalInfo .TermInfo = (PVOID )((ULONG_PTR )pConInfo + (ULONG_PTR )pConInfo -> TerminalInfo .TermInfo );
338
329
}
0 commit comments