Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Feb 21, 2025
1 parent f6375d2 commit c09f195
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/platforms/rcore_desktop_rgfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ void ToggleFullscreen(void)
CORE.Window.fullscreen = false;
CORE.Window.flags &= ~FLAG_FULLSCREEN_MODE;

if (platform.mon.mode.area.w) {
if (platform.mon.mode.area.w)
{
RGFW_monitor monitor = RGFW_window_getMonitor(platform.window);

RGFW_monitor_scale(monitor, platform.mon.mode.area);
Expand All @@ -305,7 +306,8 @@ void ToggleBorderlessWindowed(void)
if (platform.window == NULL)
return;

if (CORE.Window.fullscreen) {
if (CORE.Window.fullscreen)
{
CORE.Window.previousPosition = CORE.Window.position;
CORE.Window.previousScreen = CORE.Window.screen;

Expand Down Expand Up @@ -1227,21 +1229,35 @@ int InitPlatform(void)
flags |= RGFW_windowFullscreen;
}

if ((CORE.Window.flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0)
{
CORE.Window.fullscreen = true;
flags |= RGFW_windowedFullscreen;
}

if ((CORE.Window.flags & FLAG_WINDOW_UNDECORATED) > 0) flags |= RGFW_windowNoBorder;
if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) == 0) flags |= RGFW_windowNoResize;
if ((CORE.Window.flags & FLAG_WINDOW_TRANSPARENT) > 0) flags |= RGFW_windowTransparent;
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) flags |= RGFW_windowFullscreen;
if ((CORE.Window.flags & FLAG_WINDOW_HIDDEN) > 0) flags |= RGFW_windowHide;
if ((CORE.Window.flags & FLAG_WINDOW_MAXIMIZED) > 0) flags |= RGFW_windowMaximize;


// NOTE: Some OpenGL context attributes must be set before window creation

// Check selection OpenGL version
if (rlGetVersion() == RL_OPENGL_21) {
if (rlGetVersion() == RL_OPENGL_21)
{
RGFW_setGLHint(RGFW_glMajor, 2);
RGFW_setGLHint(RGFW_glMinor, 1);
} else if (rlGetVersion() == RL_OPENGL_33) {
}
else if (rlGetVersion() == RL_OPENGL_33)
{
RGFW_setGLHint(RGFW_glCore, 3);
RGFW_setGLHint(RGFW_glMinor, 3);
} else if (rlGetVersion() == RL_OPENGL_43) {
}
else if (rlGetVersion() == RL_OPENGL_43)
{
RGFW_setGLHint(RGFW_glCore, 3);
RGFW_setGLHint(RGFW_glMinor, 3);
}
Expand Down

0 comments on commit c09f195

Please sign in to comment.