Procházet zdrojové kódy

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

legacy
Sam Hocevar sam před 16 roky
rodič
revize
787818d0fb
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  1. +1
    -2
      src/timer.cpp

+ 1
- 2
src/timer.cpp Zobrazit soubor

@@ -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();


Načítá se…
Zrušit
Uložit