ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.75k stars 497 forks source link

Issue of fullscreen windows at start #290

Closed ilyachastikov closed 6 months ago

ilyachastikov commented 9 months ago

If fullscreen is needed at start and if creating constructor for this for example:

Transformations() {
    mSettings.mFullScreen = true;
    mSettings.mMonitorIndex = 0;
}

then the application will fail because pWindowAppRef->pWindow is not set before toggleFullscreen(winDesc) in file WindowsWindow.cpp. I think that the best solution to fix this issue is adding string pWindowAppRef->pWindow = winDesc; after 550 string number in WindowsWindow.cpp. Also I think that to adjust initial parameters in constructor is not flexible because memory allocator and filesystem is not set for moment of constructor invocation. It will be good to add some additional virtual function for this for initialization some parameters before creating window but after memory allocator and filesystem initialization.

manas-kulkarni commented 8 months ago

Is this fixed with latest release? Not able to repro failure with fullscreen set to true in constructor. Function before Init but after base systems initialized - We will have to look at this to be consistent across all platforms