Skip to content

Conversation

@San7o
Copy link
Contributor

@San7o San7o commented Sep 23, 2025

The example program at the beginning of the RGFW.h header
does not compile and contains logic flaws. This pull request fixes
them.

Specifically, the original example uses the function
RGFW_window_window_isKeyPressed in line 92 which does not
exist. This could be fixed with RGFW_window_isKeyPressed(win, RGFW_escape).

However, when the escape key is pressed, the inner
while loop breaks but the outer loop continues since the exit key
was never set. For this reason, RGFW_window_setExitKey(win, RGFW_escape)
was added and RGFW_window_isKeyPressed has been removed.

The pixel format was updated from the old name RGFW_formatRGBA
to RGFW_formatRGBA8.

Lastly, mixed tabs and spaces have been replaced with only tabs to
be consistent with the rest of the example.

@ColleagueRiley
Copy link
Owner

ColleagueRiley commented Sep 23, 2025

Looks good. Thanks for the fixes.

@ColleagueRiley ColleagueRiley merged commit 049045e into ColleagueRiley:main Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants