I'd rather the conditional is split off into one or more separate statements. Ditto for the conditional in src/win/core.c. Otherwise LGTM.