Derive Macro rust_libretro_proc::CoreOptions 
source · [−]#[derive(CoreOptions)]
{
    // Attributes available to this derive:
    #[options]
    #[categories]
}
Expand description
Implements the CoreOptions trait by generating a set_core_options() implementation
that checks whether the frontend supports “options v2” or “options v1”
and uses retro_variables as fallback.
Initializes the following data structures from the given input:
- retro_core_option_definition
- retro_variable
- retro_core_option_v2_category
- retro_core_option_v2_definition
- retro_core_options_v2
Examples
ⓘ
#[derive(CoreOptions)]
#[options({
    "foo_option_1",
    "Speed hack coprocessor X",
    "Provides increased performance at the expense of reduced accuracy",
    {
        { "false" },
        { "true" },
        { "unstable", "Turbo (Unstable)" },
    },
    "true"
}, {
    "foo_option_2",
    "Speed hack main processor Y",
    "Provides increased performance at the expense of reduced accuracy",
    {
        { "false" },
        { "true" },
        { "unstable", "Turbo (Unstable)" },
    },
})]
struct TestCore;TODO:
- Add V2 (category support) documentation
- Support *_intlvariants
