|
From: doug s. <hig...@ho...> - 2013-05-17 16:33:38
|
> > Hi, > I've noticed that the initialization process of the EAI through > \src\libeai\EAI_C_Control.c -> X3D_Initialize > > only print error messages on the standard output if the initialization > goes wrong. > Since the same function could be used from a non-console application or > library, wouldn't it be better if it returns a boolean value or, even > better, an int error code? > > If you value it useful I could make the upgrade. > Luca, I haven't looked at the code but here's some thoughts that popped to mind: instead of printf() you could call ConsoleMessage() which is meant to show the message on non-console configurations (and default to printf on console configurations). Some configurations use statusbarHud.c which has a [!] menu button which then renders the messages as pixel text over the scene window. I think John gave the Android version a separate text window. If a return value would break something, could you do something like this: make that change but also change the name to int X3D_Initialize0() with a 0 in the name, and then make a function X3D_Initialize() with the old signature (that returns no value) and calls the 0() function? Then whoever can use the return value calls the 0 function and all the old code keeps calling the old way. -Doug |