move GFX2_GetTicks() to osdep.c

This commit is contained in:
Thomas Bernard
2020-04-11 23:20:39 +02:00
parent 8876541953
commit c037c2c911
15 changed files with 98 additions and 26 deletions

View File

@@ -28,19 +28,13 @@
#endif
#include <stdlib.h>
#include <math.h>
#if !defined(USE_SDL) && !defined(USE_SDL2)
#if defined(WIN32)
#include <windows.h>
#else
#include <sys/time.h>
#endif
#endif
#include "struct.h"
#include "global.h"
#include "errors.h"
#include "buttons.h"
#include "engine.h"
#include "misc.h"
#include "osdep.h"
#include "keyboard.h"
#include "screen.h"
#include "windows.h"
@@ -864,18 +858,3 @@ int Convert_videomode_arg(const char *argument)
return -1;
}
dword GFX2_GetTicks(void)
{
#if defined(USE_SDL) || defined(USE_SDL2)
return SDL_GetTicks();
#elif defined(WIN32)
return GetTickCount();
#else
struct timeval tv;
if (gettimeofday(&tv, NULL) < 0)
return 0;
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
#endif
}