Hi,
I'm using a code similiar to the following to read data from a file:
while (file_str_read(fhandle,objName) != -1) {
file_str_read(fhandle,str);
addToDynamicGSHashmap(soundsMap, _chr(objName), str_create(str));
file_str_read(fhandle,str); // read ending *
wait(1);
}
As it is a lot of data to read an animated loading screen is displayed.
The problem is that the wait(1) is FPS dependend. In window mode the reading of the data lasts about 25 seconds (using fps_max = 0).
In fullscreen mode it lasts nearly 2 minutes as the framerate is synchronized to 60 fps.
A wait(-0.01) is also too slow.
So what's the best way to read the data from file at maximum speed non-blocking?
I'd like to avoid doing a wait only every x times during the loop.
Regards,
Pegamode.