The core_window_flags example automatically restores the window from
being minimized after 3 seconds. However, it only resets the frameCounter
if the window is minimized through the app from inputting KEY_N. This
means if you miminize the window by other means (like pressing the minimize
button) then the example will immediately restore the window because the
frame counter wasn't reset. I've fixed this by setting the frameCounter
back to 0 once it's expired. I also added a note in the UI that the example
automatically restores the window so it's not a surprise.
Removes the second build.zig in the examples directory and incorporates it
into the main build.zig. This gives the zig build system the data needed to
know if the raylib library needs to be rebuilt when running any example.
InitWindow() prints CWD during initialization,
but ChangeDirectory() does not, which is quite confusing when you start
messing with CWD. Now said function should log similar message.
Prevents unnecessary work and division by zero (when segments=0) in DrawCircleSector/DrawCircleSectorLines when startAngle equals endAngle, matching existing behavior in DrawRing/DrawRingLines.
Undefine DEBUG to avoid external redefinition
warnings/conflicts. This is probably a common
definition for many external build systems'
debug configurations.
This ensures raylib will not emit
a warning about the DEBUG definition being
redefined in external build systems.
...so it will always prioritize local version of raylib instead of
system-wide installations, which is a huge problem when testing any
changes done locally to raylib as it might cause silent mismatch issues.
There were only 4 examples affected by this issue which were using
`#include <raylib.h>`. Other examples use proper `#include "raylib.h"`
Fixes: https://github.com/raysan5/raylib/issues/4820
* [rcore] fix crash in InitWindow, due to unchecked result of InitPlatform
Check the result of InitPlatform(), if it isn't 0, report the Error
and return. This prevent crashes and allows for gracefully aborting
or recovering by checking IsWindowReady().
Partially-fixes: https://github.com/raysan5/raylib/issues/4801
* [rcore] style: store the result of InitPlatform() before checking it
Small style change that doesn't impact how the code behaves here.
Variable 'result' is not used anywhere else in this block,
it's just for compliance with Raylib's coding conventions.
Requested in PR: https://github.com/raysan5/raylib/pull/4803#discussion_r1976502788
* [rcore] use LOG_WARNING when InitPlatform() fails
...as this is preferred over LOG_ERROR.
Requested-by: https://github.com/raysan5/raylib/pull/4803#discussion_r1976651724