Couple fixes for the windows backend #34
Open
+90
−69
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.
First time dmon user, and it immediately blew up! (When trying to set a watch to a directory that didn't exist. win10.)
So here's a bunch of fixes to make it work more reliably.
Copied from the commit:
I've been thinking to remove the weird "freelist" construct too, if you're ok with that.
Because we can just loop over the (compile-time-bounded) array of active watches and pick the first index that's NULL. Since adding and removing watches is nothing done on a per-frame basis a couple loop iterations don't matter. I'd prefer the gained simplicity.
_dmon.quit should be at least volatile (done now), but an atomic would be even better. Comments?
Lasty, do you mind if i get rid of the #include <stdint.h> for the windows backend? Because I like backwards compatbility with older compilers and this is the single most annoying header to break MSVC <= 2012-ish compatibility.
I'll add some extra commits to the PR when i get the go-ahead from you.