mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: retroarch-minimal: Update to 1.21.0.
* gnu/packages/emulators.scm (retroarch-minimal): Update to 1.21.0. [source]: Remove retroarch-improved-search-paths.patch patch. [inputs]: Replace qtbase-5 with qtbase. * gnu/packages/patches/retroarch-improved-search-paths.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Change-Id: I5f2972c9ad73af060147f9b9b37eb7f8e517cbd9
This commit is contained in:
parent
30a9e5deab
commit
d5c1f1420b
3 changed files with 5 additions and 433 deletions
|
@ -19,7 +19,7 @@
|
||||||
# Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
|
# Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
|
||||||
# Copyright © 2018, 2019, 2020, 2021, 2022, 2024 Oleg Pykhalov <go.wigust@gmail.com>
|
# Copyright © 2018, 2019, 2020, 2021, 2022, 2024 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
# Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
|
# Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
|
||||||
# Copyright © 2018, 2020-2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
# Copyright © 2018, 2020-2025 Maxim Cournoyer <maxim@guixotic.coop>
|
||||||
# Copyright © 2019, 2020, 2021, 2022, 2024 Guillaume Le Vaillant <glv@posteo.net>
|
# Copyright © 2019, 2020, 2021, 2022, 2024 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
# Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
|
# Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
|
||||||
# Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
# Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
||||||
|
@ -2242,7 +2242,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/remake-impure-dirs.patch \
|
%D%/packages/patches/remake-impure-dirs.patch \
|
||||||
%D%/packages/patches/restartd-update-robust.patch \
|
%D%/packages/patches/restartd-update-robust.patch \
|
||||||
%D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \
|
%D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \
|
||||||
%D%/packages/patches/retroarch-improved-search-paths.patch \
|
|
||||||
%D%/packages/patches/rng-tools-revert-build-randstat.patch \
|
%D%/packages/patches/rng-tools-revert-build-randstat.patch \
|
||||||
%D%/packages/patches/rocclr-5.6.0-enable-gfx800.patch \
|
%D%/packages/patches/rocclr-5.6.0-enable-gfx800.patch \
|
||||||
%D%/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch \
|
%D%/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch \
|
||||||
|
|
|
@ -2634,7 +2634,7 @@ GLSL (@file{.slang}) shaders for use with RetroArch.")
|
||||||
(define-public retroarch-minimal
|
(define-public retroarch-minimal
|
||||||
(package
|
(package
|
||||||
(name "retroarch-minimal")
|
(name "retroarch-minimal")
|
||||||
(version "1.20.0")
|
(version "1.21.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -2669,11 +2669,10 @@ GLSL (@file{.slang}) shaders for use with RetroArch.")
|
||||||
;; This is an old root certificate used in net_socket_ssl_mbed.c,
|
;; This is an old root certificate used in net_socket_ssl_mbed.c,
|
||||||
;; not actually from mbedtls.
|
;; not actually from mbedtls.
|
||||||
(delete-all-but "deps/mbedtls" "cacert.h")))
|
(delete-all-but "deps/mbedtls" "cacert.h")))
|
||||||
(patches (search-patches "retroarch-improved-search-paths.patch"
|
(patches (search-patches "retroarch-unbundle-spirv-cross.patch"))
|
||||||
"retroarch-unbundle-spirv-cross.patch"))
|
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0yc16j3g2g0if64xqd7qr4dza8rw10x0zypwbl92y735825p87qi"))))
|
(base32 "17l3x77vd52g7zq62g3j1jxr51ksmdnxif1qh671qi19fsd19v1r"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
@ -2755,7 +2754,7 @@ GLSL (@file{.slang}) shaders for use with RetroArch.")
|
||||||
openssl
|
openssl
|
||||||
pulseaudio
|
pulseaudio
|
||||||
python
|
python
|
||||||
qtbase-5
|
qtbase
|
||||||
sdl2
|
sdl2
|
||||||
spirv-cross
|
spirv-cross
|
||||||
spirv-headers
|
spirv-headers
|
||||||
|
|
|
@ -1,426 +0,0 @@
|
||||||
Add support for various environment variables, used in search paths.
|
|
||||||
|
|
||||||
Upstream status: https://github.com/libretro/RetroArch/pull/17440
|
|
||||||
|
|
||||||
diff --git a/configuration.c b/configuration.c
|
|
||||||
index 7eb6c08e1e..0449e77ac2 100644
|
|
||||||
--- a/configuration.c
|
|
||||||
+++ b/configuration.c
|
|
||||||
@@ -3568,6 +3568,14 @@ static bool config_load_file(global_t *global,
|
|
||||||
{
|
|
||||||
unsigned i;
|
|
||||||
char tmp_str[PATH_MAX_LENGTH];
|
|
||||||
+ char* libretro_directory = NULL;
|
|
||||||
+ char* libretro_assets_directory = NULL;
|
|
||||||
+ char* libretro_autoconfig_directory = NULL;
|
|
||||||
+ char* libretro_cheats_directory = NULL;
|
|
||||||
+ char* libretro_database_directory = NULL;
|
|
||||||
+ char* libretro_system_directory = NULL;
|
|
||||||
+ char* libretro_video_filter_directory = NULL;
|
|
||||||
+ char* libretro_video_shader_directory = NULL;
|
|
||||||
static bool first_load = true;
|
|
||||||
bool without_overrides = false;
|
|
||||||
unsigned msg_color = 0;
|
|
||||||
@@ -3862,6 +3870,38 @@ static bool config_load_file(global_t *global,
|
|
||||||
|
|
||||||
/* Post-settings load */
|
|
||||||
|
|
||||||
+ libretro_directory = getenv("LIBRETRO_DIRECTORY");
|
|
||||||
+ if (libretro_directory) {
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.directory_libretro, libretro_directory);
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.path_libretro_info, libretro_directory);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
|
|
||||||
+ if (libretro_autoconfig_directory) /* override configuration value */
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.directory_autoconfig,
|
|
||||||
+ libretro_autoconfig_directory);
|
|
||||||
+
|
|
||||||
+ libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
|
|
||||||
+ if (libretro_cheats_directory) /* override configuration value */
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.path_cheat_database,
|
|
||||||
+ libretro_cheats_directory);
|
|
||||||
+
|
|
||||||
+ libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
|
|
||||||
+ if (libretro_database_directory) /* override configuration value */
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.path_content_database,
|
|
||||||
+ libretro_database_directory);
|
|
||||||
+
|
|
||||||
+ libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
|
|
||||||
+ if (libretro_system_directory) /* override configuration value */
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.directory_system,
|
|
||||||
+ libretro_system_directory);
|
|
||||||
+
|
|
||||||
if ( (rarch_flags & RARCH_FLAGS_HAS_SET_USERNAME)
|
|
||||||
&& (override_username))
|
|
||||||
{
|
|
||||||
@@ -4026,15 +4066,27 @@ static bool config_load_file(global_t *global,
|
|
||||||
*settings->paths.path_menu_wallpaper = '\0';
|
|
||||||
if (string_is_equal(settings->paths.path_rgui_theme_preset, "default"))
|
|
||||||
*settings->paths.path_rgui_theme_preset = '\0';
|
|
||||||
- if (string_is_equal(settings->paths.directory_video_shader, "default"))
|
|
||||||
+ libretro_video_shader_directory = getenv("LIBRETRO_VIDEO_SHADER_DIRECTORY");
|
|
||||||
+ if (libretro_video_shader_directory) { /* override configuration value */
|
|
||||||
+ configuration_set_string(settings, settings->paths.directory_video_shader,
|
|
||||||
+ libretro_video_shader_directory);
|
|
||||||
+ } else if (string_is_equal(settings->paths.directory_video_shader, "default"))
|
|
||||||
*settings->paths.directory_video_shader = '\0';
|
|
||||||
- if (string_is_equal(settings->paths.directory_video_filter, "default"))
|
|
||||||
+ libretro_video_filter_directory = getenv("LIBRETRO_VIDEO_FILTER_DIRECTORY");
|
|
||||||
+ if (libretro_video_filter_directory) { /* override configuration value */
|
|
||||||
+ configuration_set_string(settings, settings->paths.directory_video_filter,
|
|
||||||
+ libretro_video_filter_directory);
|
|
||||||
+ } else if (string_is_equal(settings->paths.directory_video_filter, "default"))
|
|
||||||
*settings->paths.directory_video_filter = '\0';
|
|
||||||
if (string_is_equal(settings->paths.directory_audio_filter, "default"))
|
|
||||||
*settings->paths.directory_audio_filter = '\0';
|
|
||||||
if (string_is_equal(settings->paths.directory_core_assets, "default"))
|
|
||||||
*settings->paths.directory_core_assets = '\0';
|
|
||||||
- if (string_is_equal(settings->paths.directory_assets, "default"))
|
|
||||||
+ libretro_assets_directory = getenv("LIBRETRO_ASSETS_DIRECTORY");
|
|
||||||
+ if (libretro_assets_directory) { /* override configuration value */
|
|
||||||
+ configuration_set_string(settings,
|
|
||||||
+ settings->paths.directory_assets, libretro_assets_directory);
|
|
||||||
+ } else if (string_is_equal(settings->paths.directory_assets, "default"))
|
|
||||||
*settings->paths.directory_assets = '\0';
|
|
||||||
#ifdef _3DS
|
|
||||||
if (string_is_equal(settings->paths.directory_bottom_assets, "default"))
|
|
||||||
diff --git a/docs/retroarch.6 b/docs/retroarch.6
|
|
||||||
index 7478040e17..d38a8ee565 100644
|
|
||||||
--- a/docs/retroarch.6
|
|
||||||
+++ b/docs/retroarch.6
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
.\" retroarch.6:
|
|
||||||
|
|
||||||
-.TH "RETROARCH" "6" "November 1, 2011" "RETROARCH" "System Manager's Manual: retroarch"
|
|
||||||
+.TH "RETROARCH" "6" "January 20, 2025" "RETROARCH" "System Manager's Manual: retroarch"
|
|
||||||
|
|
||||||
.SH NAME
|
|
||||||
|
|
||||||
@@ -239,3 +239,54 @@ Disables all kinds of content patching.
|
|
||||||
.TP
|
|
||||||
\fB-D, --detach\fR
|
|
||||||
Detach from the current console. This is currently only relevant for Microsoft Windows.
|
|
||||||
+
|
|
||||||
+.SH ENVIRONMENT
|
|
||||||
+\fBretroarch\fR honors the following environment variables:
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for core and info files,
|
|
||||||
+overriding the value of the "libretro_directory" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_ASSETS_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for assets, overriding
|
|
||||||
+the value of the "assets_directory" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_AUTOCONFIG_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for controller
|
|
||||||
+auto-configuration files, overriding the value of the
|
|
||||||
+"joypad_autoconfig_dir" configuration file option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_CHEATS_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for cheat files,
|
|
||||||
+overriding the value of the "cheat_database_path" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_DATABASE_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for database files,
|
|
||||||
+overriding the value of the "content_database_path" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_SYSTEM_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for system files,
|
|
||||||
+overriding the value of the "system_directory" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_VIDEO_FILTER_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for video filters,
|
|
||||||
+overriding the value of the "video_filter_dir" configuration file
|
|
||||||
+option.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBLIBRETRO_VIDEO_SHADER_DIRECTORY\fR
|
|
||||||
+Specify the directory where RetroArch looks for video shaders,
|
|
||||||
+overriding the value of the "video_shader_dir" configuration file
|
|
||||||
+option.
|
|
||||||
diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c
|
|
||||||
index 778f54eeda..cce011c875 100644
|
|
||||||
--- a/frontend/drivers/platform_unix.c
|
|
||||||
+++ b/frontend/drivers/platform_unix.c
|
|
||||||
@@ -1323,6 +1323,13 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
{
|
|
||||||
unsigned i;
|
|
||||||
const char* libretro_directory = getenv("LIBRETRO_DIRECTORY");
|
|
||||||
+ const char* libretro_assets_directory = getenv("LIBRETRO_ASSETS_DIRECTORY");
|
|
||||||
+ const char* libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
|
|
||||||
+ const char* libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
|
|
||||||
+ const char* libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
|
|
||||||
+ const char* libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
|
|
||||||
+ const char* libretro_video_filter_directory = getenv("LIBRETRO_VIDEO_FILTER_DIRECTORY");
|
|
||||||
+ const char* libretro_video_shader_directory = getenv("LIBRETRO_VIDEO_SHADER_DIRECTORY");
|
|
||||||
#ifdef ANDROID
|
|
||||||
int32_t major, minor, rel;
|
|
||||||
char device_model[PROP_VALUE_MAX] = {0};
|
|
||||||
@@ -1764,12 +1771,20 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
"cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path,
|
|
||||||
- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
+ if (!string_is_empty(libretro_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], libretro_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path,
|
|
||||||
+ "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
#endif
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path,
|
|
||||||
- "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
-
|
|
||||||
+ if (!string_is_empty(libretro_autoconfig_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
|
||||||
+ libretro_autoconfig_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path,
|
|
||||||
+ "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
#ifdef ASSETS_DIR
|
|
||||||
if (path_is_directory(ASSETS_DIR "/assets"))
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
|
||||||
@@ -1777,7 +1792,10 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
"assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
- if (path_is_directory("/usr/local/share/retroarch/assets"))
|
|
||||||
+ if (!string_is_empty(libretro_assets_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_ASSETS], libretro_assets_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
+ else if (path_is_directory("/usr/local/share/retroarch/assets"))
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
|
||||||
"/usr/local/share/retroarch",
|
|
||||||
"assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
@@ -1837,7 +1855,11 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
"filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
- if (path_is_directory("/usr/local/share/retroarch/filters/video"))
|
|
||||||
+ if (!string_is_empty(libretro_video_filter_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
|
||||||
+ libretro_video_filter_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
+ else if (path_is_directory("/usr/local/share/retroarch/filters/video"))
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
|
||||||
"/usr/local/share/retroarch",
|
|
||||||
"filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
@@ -1869,12 +1891,27 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
"records_config", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT], base_path,
|
|
||||||
"records", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], base_path,
|
|
||||||
- "database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
|
|
||||||
- "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
|
|
||||||
- "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
+ if (!string_is_empty(libretro_database_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_DATABASE],
|
|
||||||
+ libretro_database_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], base_path,
|
|
||||||
+ "database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
+ if (!string_is_empty(libretro_video_shader_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
|
||||||
+ libretro_video_shader_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
|
|
||||||
+ "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
+ if (!string_is_empty(libretro_cheats_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_CHEATS],
|
|
||||||
+ libretro_cheats_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
|
|
||||||
+ "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], base_path,
|
|
||||||
"overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OSK_OVERLAY], base_path,
|
|
||||||
@@ -1891,8 +1928,13 @@ static void frontend_unix_get_env(int *argc,
|
|
||||||
"saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], base_path,
|
|
||||||
"states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
|
||||||
- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], base_path,
|
|
||||||
- "system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
+ if (!string_is_empty(libretro_system_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
|
||||||
+ libretro_system_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], base_path,
|
|
||||||
+ "system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef IS_SALAMANDER
|
|
||||||
diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c
|
|
||||||
index adb27b425c..f12fb8717e 100644
|
|
||||||
--- a/frontend/drivers/platform_win32.c
|
|
||||||
+++ b/frontend/drivers/platform_win32.c
|
|
||||||
@@ -566,24 +566,51 @@ static void frontend_win32_env_get(int *argc, char *argv[],
|
|
||||||
{
|
|
||||||
const char *tmp_dir = getenv("TMP");
|
|
||||||
const char *libretro_directory = getenv("LIBRETRO_DIRECTORY");
|
|
||||||
+ const char *libretro_assets_directory = getenv("LIBRETRO_ASSETS_DIRECTORY");
|
|
||||||
+ const char* libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
|
|
||||||
+ const char* libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
|
|
||||||
+ const char* libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
|
|
||||||
+ const char* libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
|
|
||||||
+ const char* libretro_video_filter_directory = getenv("LIBRETRO_VIDEO_FILTER_DIRECTORY");
|
|
||||||
+ const char* libretro_video_shader_directory = getenv("LIBRETRO_VIDEO_SHADER_DIRECTORY");
|
|
||||||
if (!string_is_empty(tmp_dir))
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CACHE],
|
|
||||||
tmp_dir, sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
|
|
||||||
|
|
||||||
gfx_set_dwm();
|
|
||||||
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
|
||||||
- ":\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
+ if (!string_is_empty(libretro_assets_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_ASSETS], libretro_assets_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(
|
|
||||||
+ g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
|
||||||
+ ":\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER],
|
|
||||||
":\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
|
||||||
- ":\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
|
|
||||||
- ":\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
|
|
||||||
- ":\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
+ if (!string_is_empty(libretro_video_filter_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
|
||||||
+ libretro_video_filter_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
|
||||||
+ ":\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
|
||||||
+ if (!string_is_empty(libretro_cheats_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_CHEATS],
|
|
||||||
+ libretro_cheats_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
|
|
||||||
+ ":\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
||||||
+ if (!string_is_empty(libretro_database_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_DATABASE],
|
|
||||||
+ libretro_database_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
|
|
||||||
+ ":\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST],
|
|
||||||
- ":\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
||||||
+ ":\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG],
|
|
||||||
":\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
|
|
||||||
@@ -606,12 +633,26 @@ static void frontend_win32_env_get(int *argc, char *argv[],
|
|
||||||
else
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE],
|
|
||||||
":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO],
|
|
||||||
- ":\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
|
||||||
- ":\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
|
||||||
- ":\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
+ if (!string_is_empty(libretro_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], libretro_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO],
|
|
||||||
+ ":\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
|
||||||
+ if (!string_is_empty(libretro_autoconfig_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
|
||||||
+ libretro_autoconfig_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
|
||||||
+ ":\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
|
||||||
+ if (!string_is_empty(libretro_video_filter_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
|
||||||
+ libretro_video_shader_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
|
||||||
+ ":\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
|
||||||
":\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
|
||||||
@@ -620,8 +661,13 @@ static void frontend_win32_env_get(int *argc, char *argv[],
|
|
||||||
":\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
|
|
||||||
":\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
|
||||||
- fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
|
||||||
- ":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
+ if (!string_is_empty(libretro_system_directory))
|
|
||||||
+ strlcpy(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
|
||||||
+ libretro_system_directory,
|
|
||||||
+ sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
+ else
|
|
||||||
+ fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
|
||||||
+ ":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
||||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_LOGS],
|
|
||||||
":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
|
||||||
|
|
||||||
diff --git a/retroarch.c b/retroarch.c
|
|
||||||
index a7e5f5299f..59d7879ec5 100644
|
|
||||||
--- a/retroarch.c
|
|
||||||
+++ b/retroarch.c
|
|
||||||
@@ -6516,7 +6516,28 @@ static void retroarch_print_help(const char *arg0)
|
|
||||||
"Path for the save state files (*.state). (DEPRECATED, use --appendconfig and savestate_directory)\n"
|
|
||||||
, sizeof(buf) - _len);
|
|
||||||
|
|
||||||
+ /* Flush buffer here to avoid the error "error: string length ‘752’
|
|
||||||
+ * is greater than the length ‘509’ ISO C90 compilers are required
|
|
||||||
+ * to support" */
|
|
||||||
fputs(buf, stdout);
|
|
||||||
+
|
|
||||||
+#if defined(__linux__) || defined(__GNU__) || (defined(BSD) && !defined(__MACH__))
|
|
||||||
+ buf[0] = '\0';
|
|
||||||
+ _len = 0;
|
|
||||||
+ _len += strlcpy(buf + _len,
|
|
||||||
+ "\nThe following environment variables are supported:\n\n"
|
|
||||||
+ " LIBRETRO_ASSETS_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_AUTOCONFIG_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_CHEATS_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_DATABASE_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_SYSTEM_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_VIDEO_FILTER_DIRECTORY\n"
|
|
||||||
+ " LIBRETRO_VIDEO_SHADER_DIRECTORY\n\n"
|
|
||||||
+ "Refer to `man 6 retroarch' for a description of what they do.\n"
|
|
||||||
+ , sizeof(buf) - _len);
|
|
||||||
+ fputs(buf, stdout);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_DYNAMIC
|
|
Loading…
Add table
Add a link
Reference in a new issue