New 'enabled' property on displays to prevent slide rendering #410
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new configuration option
enabled
to thedisplays:
configs. By default a display is enabled but it can be explicitly disabled via config.This setting allows a single machine codebase to support multiple display configuration variants without having to duplicate all of the slides or double-up all the names. By passing a
mpf -c other_config
argument in the command line, an alternate configuration that changes the enabled displays can be used to prevent rendering of unneeded slides.Use case 1: Extended development slides
In this use case, a secondary display can be created and rendered that shows debugging options, variables and machine state, and other data useful to the developer. This display can be enabled on a development machine and disabled on a production machine, improving the slide render time on the production machine.
Use case 2: Multiple machine variants
In this use case, a game can be developed that offers different machine configurations: one edition with a DMD and another with an LCD, or one edition with an in-playfield screen and another version without.