glfwPollEvents -> lovrPlatformPollEvents;

This commit is contained in:
bjorn 2018-11-16 00:24:43 -08:00
parent da92cce634
commit 4cd5505ac2
3 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#include "event/event.h"
#include "lib/glfw.h"
#include "platform.h"
#include <stdlib.h>
#include <string.h>
@ -9,7 +9,7 @@ void lovrEventInit() {
if (state.initialized) return;
vec_init(&state.pumps);
vec_init(&state.events);
lovrEventAddPump(glfwPollEvents);
lovrEventAddPump(lovrPlatformPollEvents);
atexit(lovrEventDestroy);
state.initialized = true;
}

View File

@ -16,5 +16,6 @@
#define lovrWarnv(...) vfprintf(stderr, __VA_ARGS__)
#endif
void lovrPlatformPollEvents();
void lovrSleep(double seconds);
int lovrGetExecutablePath(char* dest, uint32_t size);

View File

@ -1,6 +1,13 @@
#include "platform.h"
#include <Windows.h>
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
void lovrPlatformPollEvents() {
glfwPollEvents();
}
void lovrSleep(double seconds) {
Sleep((unsigned int) (seconds * 1000));
}