Handle (console) applications that never created a queue correctly
in USER_AppExit(); call InitThreadInput() in InitApp().
This commit is contained in:
parent
a897518673
commit
0be24af74d
|
@ -130,8 +130,6 @@ static void USER_InstallRsrcHandler( HINSTANCE16 hInstance )
|
|||
*/
|
||||
INT16 WINAPI InitApp( HINSTANCE16 hInstance )
|
||||
{
|
||||
int queueSize;
|
||||
|
||||
/* InitTask() calls LibMain()'s of implicitly loaded DLLs
|
||||
* prior to InitApp() so there is no clean way to do
|
||||
* SetTaskSignalHandler() in time. So, broken Windows bypasses
|
||||
|
@ -146,8 +144,7 @@ INT16 WINAPI InitApp( HINSTANCE16 hInstance )
|
|||
INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) );
|
||||
|
||||
/* Create task message queue */
|
||||
queueSize = GetProfileInt32A( "windows", "DefaultQueueSize", 8 );
|
||||
if (!SetMessageQueue32( queueSize )) return 0;
|
||||
if ( !GetFastQueue() ) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -165,6 +162,8 @@ static void USER_ModuleUnload( HMODULE16 hModule )
|
|||
* USER_AppExit
|
||||
*/
|
||||
static void USER_AppExit( HTASK16 hTask, HINSTANCE16 hInstance, HQUEUE16 hQueue )
|
||||
{
|
||||
if ( hQueue )
|
||||
{
|
||||
/* FIXME: empty clipboard if needed, maybe destroy menus (Windows
|
||||
* only complains about them but does nothing);
|
||||
|
@ -190,8 +189,8 @@ static void USER_AppExit( HTASK16 hTask, HINSTANCE16 hInstance, HQUEUE16 hQueue
|
|||
QUEUE_SetExitingQueue( 0 );
|
||||
|
||||
/* Free the message queue */
|
||||
|
||||
QUEUE_DeleteMsgQueue( hQueue );
|
||||
}
|
||||
|
||||
/* ModuleUnload() in "Internals" */
|
||||
|
||||
|
|
Loading…
Reference in New Issue