Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RGFW #4176

Merged
merged 6 commits into from
Jul 22, 2024
Merged

Update RGFW #4176

merged 6 commits into from
Jul 22, 2024

Conversation

ColleagueRiley
Copy link
Contributor

@ColleagueRiley ColleagueRiley commented Jul 21, 2024

A couple of updates and bug fixes for RGFW and rcore_desktio_RGFW.c

  • Cursor holding is less of a hack. RGFW uses raw mouse movement now.
  • A monitor-related bug is fixed
  • name changes for clarity
  • HTML5 support included in RGFW.h

@raysan5 raysan5 merged commit f1f0886 into raysan5:master Jul 22, 2024
27 checks passed
@raysan5
Copy link
Owner

raysan5 commented Jul 22, 2024

@ColleagueRiley Thanks for the update!

CORE.Window.display.width = screenSize.w;
CORE.Window.display.height = screenSize.h;
/*
I think this is needed by Raylib now ?
Copy link
Owner

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw it in the glfw platform, I'm not sure if it's an init function Raylib requires or not.

@@ -643,7 +645,7 @@ Vector2 GetWindowScaleDPI(void)
{
RGFW_monitor monitor = RGFW_window_getMonitor(platform.window);

return (Vector2){((u32)monitor.scaleX)*platform.window->r.w, ((u32) monitor.scaleX)*platform.window->r.h};
return (Vector2){monitor.scaleX, monitor.scaleX};
Copy link
Owner

Choose a reason for hiding this comment

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

Not following raylib coding conventions, a space after { and before } should be used

@@ -483,14 +483,14 @@ void SetWindowIcons(Image *images, int count)
// Set title for window
void SetWindowTitle(const char *title)
{
RGFW_window_setName(platform.window, title);
RGFW_window_setName(platform.window, (char*)title);
Copy link
Owner

Choose a reason for hiding this comment

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

Not following raylib coding conventions, raylib uses (char *)

// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);

RGFW_window_mouseHold(platform.window, RGFW_AREA(CORE.Window.screen.width / 2, CORE.Window.screen.height / 2));
Copy link
Owner

Choose a reason for hiding this comment

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

Not following raylib coding conventions, raylib does not use spaces between * and / operators

@raysan5
Copy link
Owner

raysan5 commented Jul 22, 2024

Added some minor formatting comments, no worries, I can review them.

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