mirror of https://github.com/bjornbytes/lovr.git
glfwPollEvents -> lovrPlatformPollEvents;
This commit is contained in:
parent
da92cce634
commit
4cd5505ac2
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -16,5 +16,6 @@
|
|||
#define lovrWarnv(...) vfprintf(stderr, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
void lovrPlatformPollEvents();
|
||||
void lovrSleep(double seconds);
|
||||
int lovrGetExecutablePath(char* dest, uint32_t size);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue