diff options
| author | Ray <[email protected]> | 2020-12-18 19:32:52 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-12-18 19:32:52 +0100 |
| commit | 5dd142beb62f7848eb857505250fb9978601bc6e (patch) | |
| tree | cf6de06350c13484473ffcac1ecb0df059219131 /src | |
| parent | 96542269d0ad8f7be9cfb4f0e9d02df2c45703ff (diff) | |
| download | raylib-5dd142beb62f7848eb857505250fb9978601bc6e.tar.gz raylib-5dd142beb62f7848eb857505250fb9978601bc6e.zip | |
Added some Web checks for missing GLFW functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -519,7 +519,9 @@ static void PollInputEvents(void); // Register user events static void ErrorCallback(int error, const char *description); // GLFW3 Error Callback, runs on GLFW3 error // Window callbacks events static void WindowSizeCallback(GLFWwindow *window, int width, int height); // GLFW3 WindowSize Callback, runs when window is resized +#if !defined(PLATFORM_WEB) static void WindowMaximizeCallback(GLFWwindow* window, int maximized); // GLFW3 Window Maximize Callback, runs when window is maximized +#endif static void WindowIconifyCallback(GLFWwindow *window, int iconified); // GLFW3 WindowIconify Callback, runs when window is minimized/restored static void WindowFocusCallback(GLFWwindow *window, int focused); // GLFW3 WindowFocus Callback, runs when window get/lose focus static void WindowDropCallback(GLFWwindow *window, int count, const char **paths); // GLFW3 Window Drop Callback, runs when drop files into window @@ -1409,7 +1411,7 @@ void SetWindowSize(int width, int height) glfwSetWindowSize(CORE.Window.handle, width, height); #endif #if defined(PLATFORM_WEB) - emscripten_set_canvas_size(width, height); // DEPRECATED! + //emscripten_set_canvas_size(width, height); // DEPRECATED! // TODO: Below functions should be used to replace previous one but // they do not seem to work properly @@ -4525,12 +4527,14 @@ static void WindowIconifyCallback(GLFWwindow *window, int iconified) else CORE.Window.flags &= ~FLAG_WINDOW_MINIMIZED; // The window was restored } +#if !defined(PLATFORM_WEB) // GLFW3 WindowMaximize Callback, runs when window is maximized/restored static void WindowMaximizeCallback(GLFWwindow *window, int maximized) { if (maximized) CORE.Window.flags |= FLAG_WINDOW_MAXIMIZED; // The window was maximized else CORE.Window.flags &= ~FLAG_WINDOW_MAXIMIZED; // The window was restored } +#endif // GLFW3 WindowFocus Callback, runs when window get/lose focus static void WindowFocusCallback(GLFWwindow *window, int focused) |
