Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor the LIBRETRO_DATABASE_DIRECTORY environment variable. #17431

Merged
merged 2 commits into from
Jan 19, 2025

Conversation

Apteryks
Copy link
Contributor

This is a follow-up to commit 69ceb95 (from #17054)

Reviewers

@JesseTG

@LibretroAdmin
Copy link
Contributor

Regarding the C89 CI error -

fputs(buf, stdout);

fputs(buf, stdout);
   buf[0] = '\0';
   _len   = 0;

you might have to put this before the string concatenation where it fails so that _len doesn't become too big

retroarch.c Show resolved Hide resolved
The change caused the 'libretro_directory' config option to always
revert to the default value, which was not intended behavior.

Reported-by: Michael Cook
This is a follow-up to commit 69ceb95.

* frontend/drivers/platform_unix.c
(libretro_database_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_DATABASE to the value of
the LIBRETRO_DATABASE_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.
* configuration.c (config_load_file)
<libretro_database_directory>: New variable. Use the values of
the LIBRETRO_DATABASE_DIRECTORY environment variables instead of their
corresponding configured values, when set.
* docs/retroarch.6: Document.
* retroarch.c (retroarch_print_help): List supported environment
variables, and cross-reference the man page.
@Apteryks Apteryks force-pushed the add-libretro-database-env-var branch from 57a6451 to 2d97c97 Compare January 19, 2025 06:08
@LibretroAdmin LibretroAdmin merged commit 274cd41 into libretro:master Jan 19, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants