We are now using only CMake to generate `GitRef.hpp`. This should make it easier to build on Windows.
We use git's pretty formatting instead of rev-parse to output the full file in a single command, then CMake's `copy_if_different` to avoid unnecessary rebuilds.
Trick is to use %n for newlines and %x22 for quotes. See https://git-scm.com/docs/pretty-formats
We also output "unknown" and a warning when git is not available.
Instead of crashing when reaching the maximum number of source locations, display an empty source location ( with "???" everywhere).
Keeping the assert for discoverability of the limit in debug, but ensure profiler won't crash later on (or in release).
[`/DELAYLOAD`](https://learn.microsoft.com/en-us/cpp/build/reference/delayload-delay-load-import?view=msvc-170) only works with exported functions, not variables (as it patches thunks after the first load).
So instead of using exporting a pointer for `___tracy_RtlWalkFrameChain`, make it a function that will call said pointer. This only adds a `mov`+`jmp` instructions in optimized builds to the call, which is negligible compared to the actual cost of RtlWalkFrameChain. This also does not affect the reported callstack since it will use a `jmp` without touching the stack, so `___tracy_RtlWalkFrameChain` won't appear in the capture stacktrace.
`HandleTimelineMouse` did the following
- `m_highlight.active = true` when clicked
- update range while dragging
- `m_highlight.active = false` when not dragging
This causes issues when `IsMouseClickReleased` is called somewhere else as
- `mousePotentialClickRelease` is set to true on click
- At beginning of frame, `mouseDragging` is set to `false` as long as `mousePotentialClickRelease` is `true` and mouse delta is under the drag threshold
- This means that if the mouse didn't move enough in the duration of a frame, highlight would immediately stop, even though we were still holding the mouse button down
Instead, it now only stops highlighting once the mouse is no longer down (ie: has been "released", cursor having moved or not)