Skip to content

Conversation

@cold-brewed
Copy link
Contributor

Summary

This PR adds some new platform functions around global directories and fixes up an existing one.

plat_get_global_config_dir looks like it had been started before, but it assumed a particular buffer size and would wipe out your stack if the buffer was < 1024 bytes. This has been corrected and now a buffer length must be specified.

plat_get_global_data_dir was added for a global data directory.

plat_get_temp_dir was added as a way to get a temporary directory to store files or data. This mostly utilizes OS-level temporary directories.

On macOS, we will from this point forward standardize on using 86Box for application-specific directories instead of the reverse domain identifier. This makes things more consistent across platforms. For example, the global application data location will be ~/Library/Application Support/86Box and the global config directory will be ~/Library/Preferences/86Box.

As part of the move toward the consistent application data directory name, ~/Library/Application Support/86Box will also be a valid ROM search path. The existing ROM search path is still in place.

The platform function updates were also added and updated on the SDL side as well.

Checklist

  • I have discussed this with core contributors already

References

N/A

@OBattler OBattler merged commit 0dad92c into 86Box:master May 17, 2024
@cold-brewed cold-brewed deleted the plat-dir-updates branch May 21, 2024 12:29
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