SnowflakePowered / librashader

RetroArch Shaders for All
Mozilla Public License 2.0
85 stars 11 forks source link

Preset path wildcard replacement #16

Closed chyyran closed 7 months ago

chyyran commented 1 year ago

Implement path wildcard replacement from https://github.com/libretro/RetroArch/pull/15023

It remains to be seen whether or not presets will use these wildcards but librashader should eventually add support for them via a context object if they see common use.

Some wildcards can be inferred from when loading from path.

The remaining wildcards can be represented with structs; this gives a the context object that can be #[repr(C)].

Example C struct definition:

struct libra_context_t {
  LIBRA_RUNTIME runtime;
  uint8_t core_rotation;
  uint8_t user_rotation;
  bool core_aspect_vertical;
  bool view_aspect_vertical;
  bool allow_core_rotation;
  char* core_name;
  char* game_name;
  char* context_directory;
}

Because paths are canonicalized, this information needs to be available at preset parse time.

HyperspaceMadness commented 1 year ago

This sounds really great!!! I'm curious if you have support for the reference chaining and params files what I put into Retroarch. feel free to contact me on the libretro forum, or at HyperspaceMadness@outlook.com I have some ideas I'd like to discuss with you if you are interested :)

chyyran commented 1 year ago

Reference chains and params files should already work with similar resolution logic as RetroArch.

On Thu, May 25, 2023 at 11:38 AM HyperspaceMadness @.***> wrote:

This sounds really great!!! I'm curious if you have support for the reference chaining and params files what I put into Retroarch. feel free to contact me on the libretro forum, or at @.*** I have some ideas I'd like to discuss with you if you are interested :)

— Reply to this email directly, view it on GitHub https://github.com/SnowflakePowered/librashader/issues/16#issuecomment-1562175161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHUIN3XMMYMULJXBVBIIUTXH3A2DANCNFSM6AAAAAAVZ5ZB54 . You are receiving this because you authored the thread.Message ID: @.***>