浏览代码

Do not use SDL for Win32 timers. The OS has all we need.

legacy
Sam Hocevar sam 15 年前
父节点
当前提交
787818d0fb
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. +1
    -2
      src/timer.cpp

+ 1
- 2
src/timer.cpp 查看文件

@@ -17,7 +17,6 @@
#elif defined _WIN32 #elif defined _WIN32
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# include <windows.h> # include <windows.h>
# include <SDL.h> // FIXME: this should not be needed
#else #else
# include <SDL.h> # include <SDL.h>
#endif #endif
@@ -69,7 +68,7 @@ private:
cycles0 = cycles; cycles0 = cycles;
towait = deltams - ret; towait = deltams - ret;
if (towait > 5e-4f) // FIXME: use native Win32 stuff if (towait > 5e-4f) // FIXME: use native Win32 stuff
SDL_Delay((int)(towait + 0.5f));
Sleep((int)(towait + 0.5f));
#else #else
/* The crappy SDL fallback */ /* The crappy SDL fallback */
Uint32 ticks = SDL_GetTicks(); Uint32 ticks = SDL_GetTicks();


正在加载...
取消
保存