Skip to content

updates with change suggestions#1

Merged
keks137 merged 1 commit into
keks137:rgfw_init_0from
CrackedPixel:update-rgfw-changes
May 11, 2026
Merged

updates with change suggestions#1
keks137 merged 1 commit into
keks137:rgfw_init_0from
CrackedPixel:update-rgfw-changes

Conversation

@CrackedPixel
Copy link
Copy Markdown

ill leave notes on a per-line basis for my suggestions

Comment on lines +1680 to +1685
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_UNDECORATED)) FLAG_SET(flags, RGFW_windowNoBorder);
if (!FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_RESIZABLE)) FLAG_SET(flags, RGFW_windowNoResize);
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_TRANSPARENT)) FLAG_SET(flags, RGFW_windowTransparent);
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIDDEN)) FLAG_SET(flags, RGFW_windowHide);
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED)) FLAG_SET(flags, RGFW_windowMaximize);
if (!FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED)) FLAG_SET(flags, RGFW_windowFocusOnShow | RGFW_windowFocus);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the git diff makes this look odd, but i basically just re-organized it like so:

  1. single-line flag settings
  2. multi-line flag settings
  3. opengl hints (technically multi-line flag but with other calls)

Comment on lines +1688 to +1690
{
FLAG_SET(CORE.Window.flags, FLAG_FULLSCREEN_MODE);
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made this multi-line like the other fullscreen stuff just below it

Comment on lines +1707 to +1712
int result = RGFW_init();
if (result != 0)
{
TRACELOG(LOG_WARNING, "RGFW: Failed to initialize RGFW");
return -1;
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i moved this in here because it seemed like it should probably init for any fullscreen, not just 0/0 size. and all the fullscreen stuff can be together

Comment on lines +1732 to +1733
CORE.Window.previousPosition.x = (CORE.Window.display.width - CORE.Window.previousScreen.width)/2;
CORE.Window.previousPosition.y = (CORE.Window.display.height - CORE.Window.previousScreen.height)/2;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont really like the doubled /2, it seems simpler to only divide once. and to use the previous variable values instead of double magick numbers

}

RGFW_setGlobalHints_OpenGL(hints);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i put a space here to make a little bit of a logical separation between setting the previous flag and then the window creation

Comment on lines -1677 to -1678
int result = RGFW_init();
if (result != 0) { TRACELOG(LOG_WARNING, "RGFW: Failed to initialize RGFW"); return -1; }
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to do this every time and to follow the original pattern (made by riley) i think its better to only move it into the fullscreen section

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense since fullscreen is the only code path that needs it, I was thinking "oh what if we start needing it in other code paths aswell", but no such paths exist
so if there were two or more, I would absolutely move it to the top, but like this it's fine

Comment on lines 1730 to 1731
CORE.Window.previousScreen.width = 800;
CORE.Window.previousScreen.height = 450;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh i think a better approach would be to use the full window size. so exiting fullscreen would still be fullscreen but "borderless window" style instead of "exclusive fullscreen" style.

BUT:
GLFW does these exact values and i dont have any objections i guess. the dev will probably handle the resolution change, anyways, so its not a big deal

@keks137
Copy link
Copy Markdown
Owner

keks137 commented May 11, 2026

seems reasonable
I also noticed something else, hold on

@keks137 keks137 merged commit b5e6359 into keks137:rgfw_init_0 May 11, 2026
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