attempt to build web version out of emscripten legacy gl wrapper

This commit is contained in:
veclavtalica
2025-02-21 18:07:04 +03:00
parent 85e47dd677
commit dd4fc45be3
10 changed files with 123 additions and 68 deletions

View File

@ -2,12 +2,12 @@
#include "twn_util.h"
#include "twn_engine_context_c.h"
#ifndef EMSCRIPTEN
#define DMON_IMPL
#include <dmon.h>
#include <stb_ds.h>
#include <SDL2/SDL.h>
struct FilewatchEntry {
char *path;
FilewatchCallback callback;
@ -118,3 +118,19 @@ void filewatch_poll(void) {
SDL_UnlockMutex(filewatcher_lock);
}
#else
bool filewatch_add_directory(char const *dir, FilewatchCallback callback) {
(void)dir; (void)callback;
return true;
}
bool filewatch_add_file(char const *filepath, FilewatchCallback callback) {
(void)filepath; (void)callback;
return true;
}
void filewatch_poll(void) { (void)0; }
#endif