Commit Graph

23 Commits

Author SHA1 Message Date
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
libretroadmin
e798f99fea Several RARCH_CTL switches don't belong to retroarch state but
runloop state, hence remove
2023-01-22 20:16:14 +01:00
libretroadmin
e447a4e8e6 Get rid of RARCH_CTL_SET_{IDLE/PAUSED} 2023-01-07 07:32:16 +01:00
libretroadmin
5bac2b0204 Cleanups 2023-01-05 23:34:46 +01:00
LibretroAdmin
f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
Jesse Talavera-Greenberg
aaad220836
Add Xdelta support for softpatching (#14706)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Add some RARCH_DBG calls for xdelta patching

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword
2022-12-19 01:10:04 +01:00
LibretroAdmin
18ea6fa81e Turn more boolean variables into flags for runloop
- Get rid of RARCH_CTL_IS_INITED, use runloop_get_flags instead
2022-10-24 18:16:00 +02:00
LibretroAdmin
a153738bbd Create retroarch_get_flags and use it 2022-10-12 13:27:54 +02:00
LibretroAdmin
da68e73f94 Get rid of some RARCH_CTL_ commands 2022-10-10 20:14:54 +02:00
LibretroAdmin
d100e73780 Use more runloop flags 2022-10-10 08:59:27 +02:00
LibretroAdmin
d5a6c4f150 (content) use flags for content_state
(xaudio2) Use flags
2022-10-09 10:20:43 +02:00
LibretroAdmin
fcbd72dbf3
Use flags pt4 (#14497)
* * Use flags for rarch_state
* Get rid of ^M linebreaks in retroarch_types.h

* Buildfixes for consoles

* (audio driver) use flags instead of bools

* (video) Use flags instead of bools

* Rewrite input driver state bools into flags
2022-10-08 10:39:15 +02:00
Cthulhu-throwaway
908667d97a
(Netplay) Removal of older unused code (#14312) 2022-08-11 23:17:33 +02:00
twinaphex
da15bc2802 Fix C89_BUILD 2022-03-27 05:32:41 +02:00
strotlog
91bf7b553a (mmap) Handle disconnect bits on both sides of len 2022-03-27 04:36:03 +01:00
twinaphex
d2ab5d05ee Remove GONG remnants 2022-02-19 05:33:32 +01:00
twinaphex
d3d7748f92 Move global error_on_init/error_string/sjlj jump to global
state - move g_extern out of p_rarch
2021-11-21 23:26:47 +01:00
twinaphex
0b768d0460 Split up recording code 2021-11-10 02:34:04 +01:00
twinaphex
f4c5852cfa Move state from global_t to input_state_t 2021-11-09 06:27:43 +01:00
twinaphex
f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex
2886932968 Move menu global state code from global_t to menu_st 2021-11-08 20:04:55 +01:00
twinaphex
aaad65538c Move rarch_patch_blocked to runloop_state, and get rid of
RARCH_CTL_IS_PATCH_BLOCKED
2021-10-30 11:15:45 +02:00
twinaphex
49fbed2423 Get rid of input_mouse_grabbed - move retroarch types to
retroarch_types.h
2021-09-30 23:22:50 +02:00