diff options
| author | Ahmad Fatoum <[email protected]> | 2018-02-03 12:12:50 +0100 |
|---|---|---|
| committer | Ahmad Fatoum <[email protected]> | 2018-02-03 14:53:58 +0100 |
| commit | 26c9176a1422125d062185b9fe9ce3c8777d87db (patch) | |
| tree | e68dcda404d03c8ebb7e4ee3ca73a01f9aee492c /src/raylib.h | |
| parent | 44cd4faf83666d545d6a9424128c5926e5cfdcef (diff) | |
| download | raylib-26c9176a1422125d062185b9fe9ce3c8777d87db.tar.gz raylib-26c9176a1422125d062185b9fe9ce3c8777d87db.zip | |
Return false from InitWindow if glfwInit or glfwCreateWindow fails
You can't do much with raylib if glfwInit or glfwCreateWindow fails,
currently it just exits by means of TraceLog(LOG_ERROR.
User code, however, might want to fall back to a text-only UI
or display a warning if raylib can't be used.
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h index f881dc68..0aa5ccae 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -684,7 +684,7 @@ extern "C" { // Prevents name mangling of functions //------------------------------------------------------------------------------------ // Window-related functions -RLAPI void InitWindow(int width, int height, void *data); // Initialize window and OpenGL context +RLAPI bool InitWindow(int width, int height, void *data); // Initialize window and OpenGL context RLAPI void CloseWindow(void); // Close window and unload OpenGL context 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) |
