Dual Mode Option

Ventoy will define a json object for every plugin to set the configuration.
For example, control for Golbal Control Plugin, theme for Theme Plugin, menu_alias for Menu Alias Plugin ...

All these objects are dual mode option for Legacy BIOS mode and UEFI mode.

What does that mean?
Take theme plugin for example, you can set a theme object in ventoy.json and it will take effect in both Legacy BIOS mode and UEFI mode.

{
    "theme": {
        "file": "/ventoy/theme/theme.txt",
        "gfxmode": "1920x1080"
    }
}

Also, you can set theme_legacy and theme_uefi and correspondingly they will take effect in Legacy BIOS mode and UEFI mode.

{
    "theme_legacy": {
        "display_mode": "CLI"        
    },
    "theme_uefi": {
        "file": "/ventoy/theme/theme.txt",
        "gfxmode": "1920x1080"
    }
}

Similarly, control corresponded to control_legacy and control_uefi, auto_install corresponded to auto_install_legacy and auto_install_uefi ...
Of course you can't use the two styles at the same time.

Notes

1. For an object xxx the corresponded dual mode option are xxx_legacy and xxx_uefi, case-sensitive
2. You can't use the two styles at the same time. For example, you can't use control_legacy or control_uefi if you have used control
3. You can only set one of the dual mode options. For example, you can only use theme_uefi and don't set theme_legacy
4. All the sub options in the object have no difference.


ventoy.json Example

{
    "control_legacy": [
        { "VTOY_DEFAULT_MENU_MODE": "1" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" }
    ],
    
    "control_uefi": [
        { "VTOY_DEFAULT_MENU_MODE": "0" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" }
    ],
    
    "theme_legacy": {
        "display_mode": "CLI"        
    },
    
    "theme_uefi": {
        "file": "/ventoy/theme/theme.txt",
        "gfxmode": "1920x1080"
    }
}