2021-09-13 11:44 PM
I want to experiment different fps speed in simulator of TouchGFXDesigner, where is location to modify the code?
2021-09-14 04:46 AM
Hi,
I have not tried it but I think you could change the value of the VsyncInterval() in mainBase.cpp in the TouchGFX/generated/simulator/src folder.
/Romain
2021-09-14 04:49 AM
So instead of the initial value of 16.6667ms (corresponding to a frequency of 60Hz) you could put 33.3334ms for 30Hz
2021-09-15 09:24 PM
Thank you @Romain DIELEMAN , it works! However the file mainBase.cpp is meant for read only, and would override next time I generate code. Is there any place where it would not be overridden? I want the change committed to repository as well.
2021-09-16 01:58 AM
What you could maybe do is modify the main.cpp in the TouchGFX/simulator folder. The VsyncInterval function I told you to modify is part of the setupSimulator function which is found in the generated folder like you said and will be overwritten. But this function is called that the main.cpp which can be modified.
So instead of calling setupSimulator(), just copy the content/code of that function from mainBase.cpp to the main.cpp so that you can modify it without being overwritten at every code generation.
/Romain