ref: 81b5a7e789801510ea4b9dd8dba717c24833c749
parent: 7d9d80f07a3cb833c766d8bd4d36636535129f88
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Apr 1 12:47:58 EDT 2020
More cleanup
--- a/src/Backends/Platform/GLFW3.cpp
+++ b/src/Backends/Platform/GLFW3.cpp
@@ -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 @@
return FALSE;
}
+ glfwPollEvents();
+
while (!bActive)
glfwWaitEvents();
- glfwPollEvents();
/*
while (SDL_PollEvent(NULL) || !bActive)
{
@@ -318,7 +320,7 @@
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)
--- a/src/Backends/Window/GLFW3-OpenGL3.cpp
+++ b/src/Backends/Window/GLFW3-OpenGL3.cpp
@@ -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)
{
--
⑨