diff options
| author | Ray <[email protected]> | 2019-01-10 17:06:26 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-01-10 17:06:26 +0100 |
| commit | 7132ba44db85aaa4787509cb94cb859fd3009c81 (patch) | |
| tree | 1806bf49b8131297d26ff9697d2725762c0a4be2 /src/core.c | |
| parent | 91ea00747838b38b0db4808ea43124d50d316a1e (diff) | |
| download | raylib-7132ba44db85aaa4787509cb94cb859fd3009c81.tar.gz raylib-7132ba44db85aaa4787509cb94cb859fd3009c81.zip | |
Reviewed latest PR
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -739,6 +739,15 @@ bool IsWindowMinimized(void) #endif } +// Check if window is currently hidden +bool IsWindowHidden(void) +{ +#if defined(PLATFORM_DESKTOP) + return (glfwGetWindowAttrib(window, GLFW_VISIBLE) == GL_FALSE); +#endif + return false; +} + // Toggle fullscreen mode (only PLATFORM_DESKTOP) void ToggleFullscreen(void) { @@ -827,7 +836,7 @@ void SetWindowSize(int width, int height) } // Show the window -void ShowWindow() +void ShowWindow(void) { #if defined(PLATFORM_DESKTOP) glfwShowWindow(window); @@ -835,22 +844,13 @@ void ShowWindow() } // Hide the window -void HideWindow() +void HideWindow(void) { #if defined(PLATFORM_DESKTOP) glfwHideWindow(window); #endif } -// Check if window is currently hidden -bool IsWindowHidden() -{ -#if defined(PLATFORM_DESKTOP) - return glfwGetWindowAttrib(window, GLFW_VISIBLE) == GL_FALSE; -#endif - return false; -} - // Get current screen width int GetScreenWidth(void) { @@ -2282,13 +2282,13 @@ static bool InitGraphicsDevice(int width, int height) //glfwWindowHint(GLFW_AUX_BUFFERS, 0); // Number of auxiliar buffers // Check some Window creation flags - if (configFlags & FLAG_WINDOW_HIDDEN) glfwWindowHint(GLFW_VISIBLE, GL_FALSE); // Visible window + if (configFlags & FLAG_WINDOW_HIDDEN) glfwWindowHint(GLFW_VISIBLE, GL_FALSE); // Visible window else glfwWindowHint(GLFW_VISIBLE, GL_TRUE); // Window initially hidden if (configFlags & FLAG_WINDOW_RESIZABLE) glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); // Resizable window else glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Avoid window being resizable - if (configFlags & FLAG_WINDOW_UNDECORATED) glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); // Border and buttons on Window + if (configFlags & FLAG_WINDOW_UNDECORATED) glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); // Border and buttons on Window else glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); // Decorated window // FLAG_WINDOW_TRANSPARENT not supported on HTML5 and not included in any released GLFW version yet #if defined(GLFW_TRANSPARENT_FRAMEBUFFER) |
