From: | artix |
Date: | 31 Aug 2000 at 10:27:47 |
Subject: | AMIOPEN: NO MORE "SLEEP 1"!!!! |
OK.. it's still a bit of a hack, but not as ugly as the
'system("sleep 1")' thing I was using. Here's the code I'm using now in
Ewinease to check AVE init and wait if not ready:
---------------------------------------------------------------
#include <unistd.h>
.
.
.
int *ip;
.
.
.
kn_dev_lookup(buf, &aveinst, &argv0);
app = ave_open(aveinst,argv0, 0, 0);
/* WAIT FOR AVE WINDOW TO INIT IF NOT ALREADY STARTED */
ip=(unsigned int *)__EWE_INITPTRS.aveinst;
if(*(ip+64)==0) while (*(ip+52)<9) usleep(10000);
/* CONTINUE ON */
.
.
.
-----------------------------------------------------------------
Enjoy :)
Patrick Roberts
Artix Software
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html