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 - [KMSDRM][PATCH] Fix for programs that re-create their window.
Summary: [KMSDRM][PATCH] Fix for programs that re-create their window.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-26 02:05 UTC by Manuel Alfayate Corchete
Modified: 2020-07-19 20:15 UTC (History)
0 users

See Also:


Attachments
Fixes the window re-creation in the KMSDRM video backend. (4.63 KB, patch)
2020-06-26 02:05 UTC, Manuel Alfayate Corchete
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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! :)