Add fixes and improvements to work with C++ code #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @gyrovorbis, initially I wanted to add only one fix related
atomic_bool
variable declaration that generates compilation error when you compiles library under C++. However, I found it's kind of uncomfortable to use with necessity to usesetup_func
in start function. So, here are several fixes I made for this wonderful libatomic_bool
under C++setup_func
from vmu_profiler_start function and instead I return pointer to vmu_profiler_t in this functionuser_data
to vmu_profiler_measurement so that you can get pointer to needed object inside of get_measure_callbacxkfps_frame
andfps_frames[]
variables from vmu_profiler_t and code that used them in vmu_profiler_update, since I think this should be made on client sideMy changes brake backward compatibility but I believe it's not a big deal. Here is an example how I use this new format in my code