summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2018-02-04 12:26:28 +0100
committerraysan5 <[email protected]>2018-02-04 12:26:28 +0100
commit70e0070a853a76c9ffe5518c2861bf24396e9676 (patch)
tree4ca8e32ea8d1786655853f51a03e5e468355738f /src/raylib.h
parente2861fa71ffb4d5145369939c03d19f4a2945d95 (diff)
downloadraylib-70e0070a853a76c9ffe5518c2861bf24396e9676.tar.gz
raylib-70e0070a853a76c9ffe5518c2861bf24396e9676.zip
Reviewed window initialization
In case graphic device could not be created it returns false instead of failing with an error tracelog (and consequently closing the program). Window initialization success could be checked with new function IsWindowReady()
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 0aa5ccae..61a14a8c 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -684,8 +684,9 @@ extern "C" { // Prevents name mangling of functions
//------------------------------------------------------------------------------------
// Window-related functions
-RLAPI bool InitWindow(int width, int height, void *data); // Initialize window and OpenGL context
+RLAPI void InitWindow(int width, int height, void *data); // Initialize window and OpenGL context
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
+RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)