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

Make use of containing ROM folder optional #98

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

TomChapple
Copy link
Contributor

As alluded to in #95, it does not make much sense to provide an option to use a ROM's containing directory as a place to store resources if permission does not exist. This is most likely to happen when using APIs such as the Portal API to gain access to individual files.

It is possible to detect if we are in a contained environment using environment variables, but I feel as though it may introduce unnecessary overhead for something we should likely know ahead of time during build.

I was originally going to have the combo removed altogether if there was only one option, but I decided against it for simplicity of this pull request. This is something I can implement, but I'm notorious for over-engineering, so I would rather push this now.

One area I wish to receive feedback on is the name of the preprocessor directive: PREVENT_ROM_FOLDER_USAGE. I'm not sure what convention is being used, given that those starting with GS_ tend to be focused on the functionality itself rather than the GUI. I'm happy to change this directive's name if it is preferred.

This is mostly useful for distributions where it is not expected for
permission to be granted to the directory a ROM is contained in (e.g.
Flatpak or other Portal API use).

To this end, the `ImGui::Combo` API now uses a list rather that a double
null-terminated string as—combined with trailing commas in C++11—this
allows for entries in this list to be easily added and removed.

Currently, no platform uses this, but this will likely be useful for a
contained release.
@drhelius drhelius merged commit 3639641 into drhelius:master Apr 1, 2024
8 checks passed
@TomChapple TomChapple deleted the optional-rom-folder branch April 1, 2024 11:07
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.

2 participants