commit fdd8229891e4d4d0ddfaa9f8043baf9917ae60c7
parent 3eb38dcbe812032a1542be5148692a7297a6ec96
Author: amin <dev@aminmesbah.com>
Date: Mon, 10 Jun 2024 19:43:39 +0000
Compile static SDL and build tunnel runner on windows
FossilOrigin-Name: 590a79e1155c93bf9a16671a21ed4a4f18aff1a183c77c9e267b13d233346b79
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tunnel_runner.c b/tunnel_runner.c
@@ -1,6 +1,6 @@
#include <assert.h>
#include <inttypes.h>
-#include <SDL2/SDL.h>
+#include "SDL.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
@@ -85,10 +85,7 @@ static struct TransformData transform;
uint64_t
get_current_time_ms(void)
{
- struct timespec current;
- clock_gettime(CLOCK_MONOTONIC, ¤t);
- uint64_t milliseconds = ((current.tv_sec * 1000000000) + current.tv_nsec) / 1000000;
- return milliseconds;
+ return SDL_GetTicks64();
}
@@ -420,8 +417,10 @@ sdl_cleanup(void)
int
-main(void)
+main(int argc, char *argv[])
{
+ (void)argc;
+ (void)argv;
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) != 0)
{
TR_LOG_ERR("SDL_Init failed: %s\n", SDL_GetError());