afritz1 / OpenTESArena

Open-source re-implementation of The Elder Scrolls: Arena.
MIT License
915 stars 68 forks source link

Add exclusive fullscreen support #222

Closed afritz1 closed 2 years ago

afritz1 commented 2 years ago

Replaces my first attempt PR #158 from 2019.

It seems to work in general on Windows 10. Will test on Raspberry Pi 4.

Two bugs found so far that I'm okay with merging because they are minor: 1) If an SDL_Texture (specifically the debug profiler text) tries to update when exclusive fullscreen is on but the game is not focused, the lock texture call fails and an assertion is hit in TextBox::getTextureID(). This happens when alt-tabbing. 2) Starting the game in exclusive fullscreen and then switching to windowed will make the window appear like borderless fullscreen because the renderer wasn't initialized with the dimensions from the options

afritz1 commented 2 years ago

Works fine on Raspberry Pi 4.