We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5214

Summary: [KMSDRM][PATCH] Fix for programs that re-create their window.
Product: SDL Reporter: Manuel Alfayate Corchete <redwindwanderer>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: All   
OS: Linux   
Attachments: Fixes the window re-creation in the KMSDRM video backend.

Description Manuel Alfayate Corchete 2020-06-26 02:05:27 UTC
Created attachment 4396 [details]
Fixes the window re-creation in the KMSDRM video backend.

Hi there,

Recreating a program's window requires to re-create the EGL and GBM surfaces, and also to call the SetCRTC function each time.
This patch does that, corrects the variable type for egl_surface_dirty to SDL_bool, and initializes the windata fields properly.

It fixes the CommanderGenius engine, that would prevously show a black screen when changing video settings, since the game re-creates it's window every time video/display settings are changed.

This patch works cleanly against current libSDL2 HG version.
Please merge.

Thanks


Manuel Alfayate Corchete
Comment 1 Manuel Alfayate Corchete 2020-07-19 20:15:20 UTC
Fix is now merged! :)