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

[rcore] SetWindowState(FLAG_WINDOW_ALWAYS_RUN) toggles fullscreen off #4618

Open
4 tasks done
Volcanic-Penguin opened this issue Dec 18, 2024 · 1 comment
Open
4 tasks done

Comments

@Volcanic-Penguin
Copy link

Volcanic-Penguin commented Dec 18, 2024

  • I tested it on latest raylib version from master branch
  • I checked there is no similar issue already reported
  • I checked the documentation on the wiki
  • My code has no errors or misuse of raylib

Issue description

Running SetWindowState(FLAG_WINDOW_ALWAYS_RUN) after ToggleFullscreen() will toggle fullscreen off. I suppose you can just make sure to run SetWindowState(FLAG_WINDOW_ALWAYS_RUN) before ToggleFullscreen() but it seems like undesired behavior regardless.

Environment

Raylib 5.5 C
Windows 10
Platform backend: DESKTOP (GLFW)
Renderer: Intel(R) HD Graphics 530

Code Example

#include "raylib.h"

int main(void)
{
    InitWindow(1600, 900, "raylib [core] example - basic window");
    ToggleFullscreen();
    SetWindowState(FLAG_WINDOW_ALWAYS_RUN);

    while (!WindowShouldClose())
    {
        BeginDrawing();
            ClearBackground(BLACK);
            DrawText("Congrats! You created your first window!", 190, 200, 20, ORANGE);
        EndDrawing();
    }

    CloseWindow();

    return 0;
}
@veins1
Copy link
Contributor

veins1 commented Dec 19, 2024

Changing to (actual/real) fullscreen won't happen instantly (GLFW will take a moment to change the resolution). When glfwWaitEvents() stops getting called that probably breaks that process for some reason.

@asdqwe Could you please explain your reasoning for thinking this is the cause of the issue?

veins1 added a commit to veins1/raylib that referenced this issue Dec 19, 2024
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

No branches or pull requests

2 participants