getWorkingDirectory: implemented to return "./" #261
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's enough to allow most things that might want to use it to work. The function should only be used for local development or debugging purposes anyway, as the concept of CWD is not portable and is not friendly to end users running program via high-level shells (eg. Windows Explorer or Finder or such).
Difference from LOVE: LOVE returns the CWD as an absolute path. Lutro returns a relative path.
I split it out from PR #260 since the latest implementation of
getUserDirectory
will no longer usegetCurrentDirectory
as a fallback. I felt it was still worthwhile to retain the work of implementinggetCurrentDirectory()
even if it's not directly supported by libretro API, and not recommended to use it anywhere outside of local/development contexts. I think it is still nice to have these sort of dev-friendly APIs available for use, and assume devs will use them effectively and responsibly.