Skip to content

Commit

Permalink
Fix #88
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG committed Oct 19, 2023
1 parent fcbd96b commit c800772
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libretro/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ PUBLIC_SYMBOL void retro_set_environment(retro_environment_t cb) {
char melon_dir[PATH_MAX];
strlcpy(melon_dir, system_dir, sizeof(melon_dir));
pathname_make_slashes_portable(melon_dir);
size_t basePathLength = strnlen(melon_dir, sizeof(melon_dir));
if (basePathLength > 0 && melon_dir[basePathLength - 1] == '/')
melon_dir[basePathLength - 1] = '\0';
retro::info("System directory: \"{}\"", melon_dir);
retro::_system_directory = melon_dir;

Expand Down

0 comments on commit c800772

Please sign in to comment.