RetroArch/gfx
HyperspaceMadness e4a11cff59
Shader Preset - Wildcard Replacement in Paths on Load (#15023)
When a simple preset loads, wildcards which are found in paths inside the presets will 
be replaced with values coming from the current RetroArch context.  This will operate
on both texture paths and reference paths.

This would allow you to do things like have one preset which could be used with the entire list of images from the Bezel Project

E.G. 
    "/shaders/MyBackground_$VID-DRV$ _$CORE$.png" 
would be replaced with
   "/shaders/MyBackground_glcore_YabaSanshiro.png"
If  no file found at that path, the path will revert to the original path, so operates as a fallback
   "/shaders/MyBackground_$VID-DRV$ _$CORE$.png" 

  * Possible wildcards/tokens to be replaced:
 * 
 *   $CONTENT-DIR$ -> Content Directory of the game rom
 * 
 *   $CORE$       -> Core name
 * 
 *   $GAME$       -> Game ROM's name
 * 
 *   $VID-DRV$   -> Video Driver: Currently active driver, possible replacement values:
 *       glcore
 *       gl
 *       vulkan
 *       d3d11
 *       d3d9_hlsl
 *       "N/A"
 * 
 *   $VID-DRV-SHADER-EXT$   -> Video Driver Shader File Extension: The extension of shaders type supported by the current video driver:
 *       cg
 *       glsl
 *       slang
 * 
 *   $VID-DRV-PRESET-EXT$   -> Video Driver Preset File Extension: The extension of shaders type supported by the current video driver:
 *       cgp
 *       glslp
 *       slangp
 * 
 *   $CORE-REQ-ROT$   -> Core Requested Rotation: Rotation the core is requesting, possible replacement values:
 *       CORE-REQ-ROT-0
 *       CORE-REQ-ROT-90
 *       CORE-REQ-ROT-180
 *       CORE-REQ-ROT-270
 * 
 *   $VID-ALLOW-CORE-ROT$   -> Video Allow Core Rotation: Reflects Retroarch's setting allowing the core requested rotation to affect the final rotation:
 *       VID-ALLOW-CORE-ROT-OFF
 *       VID-ALLOW-CORE-ROT-ON
 * 
 *   $VID-USER-ROT$   -> Video User Rotation: Rotation the core is requesting, possible replacement values, does not affect the UI:
 *       VID-USER-ROT-0
 *       VID-USER-ROT-90
 *       VID-USER-ROT-180
 *       VID-USER-ROT-270
 * 
 *   $VID-FINAL-ROT$   -> Video Final Rotation: Rotation which is the sum of the user rotation and the core rotation if it has been allowed, does not affect the UI:
 *       VID-FINAL-ROT-0
 *       VID-FINAL-ROT-90
 *       VID-FINAL-ROT-180
 *       VID-FINAL-ROT-270
 * 
 *   $SCREEN-ORIENT$   -> Screen Orientation: User adjusted screen orientation, will change windows from landscape to portrait, including the Retroarch UI:
 *       SCREEN-ORIENT-0
 *       SCREEN-ORIENT-90
 *       SCREEN-ORIENT-180
 *       SCREEN-ORIENT-270
 * 
 *   $VIEW-ASPECT-ORIENT$   -> Viewport Aspect Orientation: Orientation of the aspect ratio of the RetroArch viewport
 *       VIEW-ASPECT-ORIENT-HORZ
 *       VIEW-ASPECT-ORIENT-VERT
 * 
 *   $CORE-ASPECT-ORIENT$   -> Core Aspect Orientation: Orientation of the aspect ratio requested by the core
 *       CORE-ASPECT-ORIENT-HORZ
 *       CORE-ASPECT-ORIENT-VERT
 * 
 *   $PRESET_DIR$  -> Preset directory's name
 * 
 *   $PRESET$     -> Preset's name
 * 
 * If no wildcards are found within the path, or the path 
 * after replacing the wildcards does not exist on disk,
 * the path returned will be unaffected.
2023-02-26 19:06:57 +01:00
..
common Get rid of obsolete HAVE_VIDEO_LAYOUT - obsolete spec, was only 2023-02-23 21:03:41 +01:00
display_servers
drivers (D3D11/12) Cleanups (#15025) 2023-02-26 13:27:05 +01:00
drivers_context (PS3) Update code to use flags 2023-02-23 13:22:28 +01:00
drivers_display (PSL1GHT) Code cleanup (#15006) 2023-02-22 08:14:38 +01:00
drivers_font (RSX) Updates to video driver 2023-02-23 16:11:01 +01:00
drivers_font_renderer (PSL1GHT) Fix some warnings 2023-02-20 14:50:54 +01:00
drivers_shader Update shader_glsl.c 2023-02-26 19:03:05 +01:00
include
video_filters Cleanups/style nits 2023-02-23 13:15:14 +01:00
widgets
font_driver.c (PSL1GHT) Use HAVE_GCM as a define for compiling in the libgcm video 2023-02-21 14:24:00 +01:00
font_driver.h
gfx_animation.c
gfx_animation.h
gfx_display.c (PSL1GHT) Use HAVE_GCM as a define for compiling in the libgcm video 2023-02-21 14:24:00 +01:00
gfx_display.h (XMB) Layout corrections (#14986) 2023-02-16 16:08:57 +01:00
gfx_thumbnail_path.c
gfx_thumbnail_path.h
gfx_thumbnail.c
gfx_thumbnail.h
gfx_widgets.c
gfx_widgets.h
video_coord_array.c
video_coord_array.h
video_crt_switch.c
video_crt_switch.h
video_defines.h
video_display_server.h
video_driver.c Shader Preset - Wildcard Replacement in Paths on Load (#15023) 2023-02-26 19:06:57 +01:00
video_driver.h Shader Preset - Wildcard Replacement in Paths on Load (#15023) 2023-02-26 19:06:57 +01:00
video_filter.c
video_filter.h
video_shader_parse.c Shader Preset - Wildcard Replacement in Paths on Load (#15023) 2023-02-26 19:06:57 +01:00
video_shader_parse.h Shader Preset - Wildcard Replacement in Paths on Load (#15023) 2023-02-26 19:06:57 +01:00
video_thread_wrapper.c Get rid of obsolete HAVE_VIDEO_LAYOUT - obsolete spec, was only 2023-02-23 21:03:41 +01:00
video_thread_wrapper.h