Open
Description
Issue description
Upon running the procedure ToggleFullscreen()
, raylib reports "GetScreenWidth()" and "GetScreenHeight()" as values set before SetWindowSize(x, y)
. However, without ToggleFullscreen()
, the original values are kept for one frame then immediately restored to correct full resolution.
Environment
Platform backend: DESKTOP (GLFW)
OS: Fedora 39 x86_64
Desktop: Gnome X11
OpenGL version: 4.6
GPU: Integrated
Issue Screenshot
Screencast from 2024-04-22 18-22-46.webm
Screencast from 2024-04-22 18-26-19.webm
Code Example
#include <stdio.h>
#include <raylib.h>
int main(void)
{
InitWindow(1, 1, "Application");
int display = GetCurrentMonitor();
SetWindowSize(GetMonitorWidth(display), GetMonitorHeight(display));
ToggleFullscreen();
while (!WindowShouldClose()) {
BeginDrawing();
DrawRectangle(0, 0, GetMonitorWidth(display), GetMonitorHeight(display), RAYWHITE);
printf("%d %d\n", GetScreenWidth(), GetScreenHeight());
DrawRectangle(0, 0, GetScreenWidth() / 2, GetScreenHeight() / 2, RED);
EndDrawing();
}
CloseWindow();
return 0;
}