Forum » » Création-Développement » » #Two fixée (beta-test)
Posté : 14-10-2010 16:51
@crisot
I can say, that 100% cpu loading is not because of Warp3D itself, but because you forget to add some kind of "pause-reply" to code (because for now you just have busy-loop looks like).
When i code TheVague diskmag (warp3d as well), i also have on the first releases 100% cpu loading, and i thinking that its because of warp3d crap, but , then i understand what need to do and for now it give 4-5% of cpu loading. Imho you have the same problem in code here.
I fix it by putting to the main routine that:
while(!esc)
{
//fix boosy-loop crap about getmsg/replymsg in loop;
WaitPort(window->UserPort);
//main loop
if(FALSE==GetInput(window)) {
printf("main input func failed\n");
goto panic;
}
}
Without "WaitPort" it give me 100% cpu loading as for you. I am sure on 99% that its the cause. Even if its not exactly the same problem, for sure its BusyLooping problem (for/while/etc) and need some sort of pause. You also can just fix it by some ugly Delay(1); stuff :)
Message édité par : kas1e / 14-10-2010 16:53
Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=874&forum=14