Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDL: Do not reset window size when engines update rendering surface
This change allows: * Engines to update their target rendering surface/size and pixel format with the backend multiple times during gameplay; * Users to resize the ScummVM window without having it reset size/position every time an engine updates its target surface format; * Conversions/scaling to continue to run efficiently in hardware, instead of requiring engines to pick their maximum possible output format once and upscale inefficiently in software; * The window to reset size once when an engine calls to set its initial output size, and to reset again once ScummVM returns to the launcher. This is relevant for at least SCI32 and DreamWeb engines, which perform graphics mode switches during games. This is a not-awesome hack, but it seems to be the least terrible way I could find to enable a satisfactory user experience for resizing without making more extensive changes to the graphics manager API, and without forcing engines to opt-in to not breaking the user experience with their calls to change screen modes (which should not be the responsibility of game engines). One potential alternative to having the graphics manager track the global engine pointer would be to instead use a flag that gets set and cleared by the main ScummVM loop before it calls to run an engine, and after the engine run call returns.
- Loading branch information
Showing
4 changed files
with
41 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters