Skurdt / SK.Libretro

Libretro wrapper written in C# with support for the Unity game engine
MIT License
28 stars 13 forks source link

Provide implementation for Core Options newer format #1

Closed Skurdt closed 2 years ago

Skurdt commented 3 years ago

Implement RETRO_ENVIRONMENT_SET_CORE_OPTIONS and RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL by figuring out how to read and convert the retro_core_option_definition struct to C#.

Skurdt commented 3 years ago

Turns out, cores that requests RETRO_ENVIRONMENT_SET_CORE_OPTIONS do work...

The issue comes from the RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL environment request, where the pointer to the 'us' member appears to by invalid.

I re-added the previous parsing so cores using RETRO_API_VERSION == 1 can work again.

Cores using RETRO_API_VERSION == 1 that request RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL can be forced to use RETRO_API_VERSION == 0 by adding them manually to "StreamingAssets/libretro~/cores_using_options_intl.json" (default location). Example:

{
    "Cores": [
        "vecx"
    ]
}

PS: It may or may not, depending on the core, disable some of the core's internal features. But at least there's something to work with...