More cleanup

This commit is contained in:
Clownacy 2020-04-01 16:47:58 +01:00
parent 7d9d80f07a
commit 81b5a7e789
2 changed files with 7 additions and 5 deletions

View file

@ -2,6 +2,7 @@
#include <chrono>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <thread>
@ -20,7 +21,7 @@
BOOL bActive = TRUE;
extern GLFWwindow *window;
GLFWwindow *window;
static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
{
@ -286,10 +287,11 @@ BOOL PlatformBackend_SystemTask(void)
return FALSE;
}
glfwPollEvents();
while (!bActive)
glfwWaitEvents();
glfwPollEvents();
/*
while (SDL_PollEvent(NULL) || !bActive)
{
@ -318,7 +320,7 @@ BOOL PlatformBackend_SystemTask(void)
void PlatformBackend_ShowMessageBox(const char *title, const char *message)
{
//SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, message, NULL);
printf("ShowMessageBox - '%s' - '%s'\n", title, message);
}
unsigned long PlatformBackend_GetTicks(void)

View file

@ -14,8 +14,8 @@
#include "../Platform.h"
// Horrible hacks
GLFWwindow *window;
// Horrible hack
extern GLFWwindow *window;
BOOL WindowBackend_OpenGL_CreateWindow(const char *window_title, int *screen_width, int *screen_height, BOOL fullscreen)
{