jpcima / ysfx

Hosting library for JSFX
Apache License 2.0
159 stars 25 forks source link

Doing no graphics in `@gfx`, stalls processing the full @gfx section #47

Closed frank1119 closed 2 years ago

frank1119 commented 2 years ago

This is probably not a big issue and should not keep you from going to sleep sometimes (as far as I'm concerned):

When you have for example the following code in the @gfx section, processing of all code in that section stops. In this example gfx.debug will not increase:

@sample
gfx.debug_sample += 1;

@gfx
gfx.debug += 1;

// Uncomment this for letting things run 'normal'
/*
gfx_x=10;
gfx_y=10;
tmp=#;
sprintf(tmp,"Just to do something %d", gfx.debug);
gfx_drawstr(tmp);
*/

You can see in the editor whether gfx.debug and gfx.debug_sample (the last one will keep increasing) are increasing or not: image

BTW: I'm not trying to find as many bugs as I can find and I'm also not implying they al must be fixed at once, but you people seem really determined to make this plugin a good plugin and therefore I will report what I run into. Maybe at some time I find the strength to set up an environment that I can compile this plugin myself and be a little more constructive. One can always hope...

jpcima commented 2 years ago

The view would skip repaints when the view is unchanged, as an optimization; but this optimization has been implemened with a logic error, which should be now fixed in 6dd9cf2.

frank1119 commented 2 years ago

It works fine now. Thanks