From 8d267a60412a96637fd69951d3492efce7054207 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 2 May 1999 19:09:07 +0000 Subject: [PATCH] Only check number of tasks after first message. Use a 16-bit module for creating the initial task. --- miscemu/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/miscemu/main.c b/miscemu/main.c index 5ee83ee88e4..afbef47b3f6 100644 --- a/miscemu/main.c +++ b/miscemu/main.c @@ -107,11 +107,12 @@ void MAIN_EmulatorRun( void ) /* Start message loop for desktop window */ - while ( GetNumTasks16() > 1 && Callout.GetMessageA( &msg, 0, 0, 0 ) ) + do { + if (!Callout.GetMessageA( &msg, 0, 0, 0 )) break; Callout.TranslateMessage( &msg ); Callout.DispatchMessageA( &msg ); - } + } while (GetNumTasks16() > 1); ExitProcess( 0 ); } @@ -156,7 +157,7 @@ int main( int argc, char *argv[] ) if (!LoadLibraryA( "KERNEL32" )) return 1; /* Create initial task */ - if ( !(pModule = NE_GetPtr( GetModuleHandle16( "KERNEL32" ) )) ) return 1; + if ( !(pModule = NE_GetPtr( GetModuleHandle16( "KERNEL" ) )) ) return 1; if ( !TASK_Create( THREAD_Current(), pModule, 0, 0, FALSE ) ) return 1; /* Initialize CALL32 routines */