Fixed incorrectly placed PeekMessage().
Merge pull request #2832 from SickheadGames/WinFix

WinDx Fix
Merge branch 'develop' into build