diff options
| author | raysan5 <[email protected]> | 2018-02-04 12:26:28 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2018-02-04 12:26:28 +0100 |
| commit | 70e0070a853a76c9ffe5518c2861bf24396e9676 (patch) | |
| tree | 4ca8e32ea8d1786655853f51a03e5e468355738f /src/raylib.h | |
| parent | e2861fa71ffb4d5145369939c03d19f4a2945d95 (diff) | |
| download | raylib-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.h | 3 |
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) |
