# Windows build has a weird frame rate issue

**URL:** <https://discourse.cataclysmdda.org/t/windows-build-has-a-weird-frame-rate-issue/2520>\
**Category:** The Garage\
**Created:** [August 3, 2013, 4:07am UTC](https://discourse.cataclysmdda.org/t/windows-build-has-a-weird-frame-rate-issue/2520 "2013-08-03T04:07:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seth](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/seth/32/995_2.png) [@Seth](https://discourse.cataclysmdda.org/u/Seth)\
**Post date:** [August 3, 2013, 4:07am UTC](https://discourse.cataclysmdda.org/t/windows-build-has-a-weird-frame-rate-issue/2520/1 "2013-08-03T04:07:34Z")

</div>

At least on this machine, compiling the latest version with MingW appears to completely break the frame rate. The game runs fine, but it’s chugging along with 100% of a CPU core. I have no idea what is causing this. It happens with both SDL and non-SDL versions, and regardless of optimization level. I checked the getch functions in wincurse.cpp and sdlcurse.cpp, since those are the only places calling Sleep or SDL\_Delay, and tried rearranging a few lines but I haven’t found a fix yet.

Frames do run at the normal rate with the latest downloadable Windows build (that is, ~0% CPU use when idle), and I haven’t seen this particular issue reported by anyone else, so if someone could verify it or tell me what’s going on here, I would appreciate it.

This isn’t an issue when building version 0.6, it seemingly applies only to recent versions.

---

<div class="post-metadata">

**Author:** ![1942rob](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/1942rob/32/979_2.png) [@1942rob](https://discourse.cataclysmdda.org/u/1942rob)\
**Post date:** [August 3, 2013, 3:00pm UTC](https://discourse.cataclysmdda.org/t/windows-build-has-a-weird-frame-rate-issue/2520/2 "2013-08-03T15:00:49Z")

</div>

Made a fix for the WinGDI (nonSDL) version [Here](https://github.com/CleverRaven/Cataclysm-DDA/pull/2304) (seeing as that issue was my fault :]).

As for the SDL version, i have no idea yet.

---

<div class="post-metadata">

**Author:** ![utunnels](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/utunnels/32/81_2.png) [@utunnels](https://discourse.cataclysmdda.org/u/utunnels)\
**Post date:** [August 4, 2013, 2:25pm UTC](https://discourse.cataclysmdda.org/t/windows-build-has-a-weird-frame-rate-issue/2520/3 "2013-08-04T14:25:08Z")

</div>

```
        SDL_Delay(1);

```

Maybe changing 1 to 2 will fix it. I’m not sure though, cpu usage is around 20% on my pc.
