Fixed thread/start stop issue, meaning I fixed the modes so the thread stops when the mode is <= 0. There were also more issues with how the thread started and stopped, fixed those too.
Reduced lines thread frequency and also added the suggested offset. I see no difference in-game, but it might work slightly better. You'll have to judge for yourself.
Fixed the profiler issue. It doesn't crash anymore when pressing shift + f3, but I also can't see profiler info in there, so I'm not sure it's working, but I hope it is. Negligible performance impact would be cool.
Changes proposed in this pull request:
For the future