[ scummvm-Patches-2123680 ] SDL: Backend transaction / rollback support

SourceForge.net noreply at sourceforge.net
Tue Sep 23 02:18:58 CEST 2008


Patches item #2123680, was opened at 2008-09-23 02:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=2123680&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Johannes Schickel (lordhoto)
Assigned to: Max Horn (fingolfin)
Summary: SDL: Backend transaction / rollback support

Initial Comment:
This patch adds proper transaction support to the SDL backend and also adds support for rollback to the backend. Rollback means if a newly set configuration, done inside a transaction block, can't be setup correctly it will try to switch back to the former configuration.

What needs to be discussed:
 - Somehow endGFXTransaction needs to return a error code on failure, for example if a new mode can't be setup so the client code is able to take care of it

 Things that need to be reflected in common OSystem documentation:
 - Now setFeatureState called with kFeatureFullscreenMode and kFeatureAspectRatioCorrection needs to be called within a transaction block
 - Now setGraphicsMode has to be called inside a transaction block

 - Porters subclassing the SDL backend should need to update their code, it would be wise to hear what they think of it

 - Engines / other code calling setFeatureState and/or setGraphicsMode might be updated to do it inside a gfx transaction block

Things this patch breakes:
 - '-f' switch, since code in base/main.cpp will setup the fullscreen mode specified in the config file after transient domain is cleared.
 - '-g' switch for the same reasons as with '-f' as I would say, but I'm not really sure how this is done really (a.k.a: CALL FOR HELP, please somebody check this!)

 Both are related to bug #2120780 "GUI: gui-theme command-line option ignored" as far as I can tell it. At least it has the same reason, that the transient domain is not kept when code relies on it.

 What is tested:
 - I was able to switch scalers on run time, fullscreen toggle and aspect ratio toggle
 - Rollback should work, it successfully switched back from 3x to 2x mode when 3x is not supported by the system (tested with Xephyr)

 It is of course still heavy work in progress as you see from the description.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=2123680&group_id=37116




More information about the Scummvm-tracker mailing list