foxygit / fake-08-xbox360 Log in
commit b91a19d7ea2e7436e26cc1b3aaa8c4fe6d14214e
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Mon Apr 4 07:41:01 2022 -0600
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Mon Apr 4 07:41:01 2022 -0600

    Fix multicart games on 3ds

    remove extra slash that was messing up paths on cart load calls
---
 platform/3ds/source/3dsHost.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/platform/3ds/source/3dsHost.cpp b/platform/3ds/source/3dsHost.cpp
index 9aa8350..13b4f5e 100644
--- a/platform/3ds/source/3dsHost.cpp
+++ b/platform/3ds/source/3dsHost.cpp
@@ -269,7 +269,7 @@ void audioSetup(){
 Host::Host() {
     _logFilePrefix = "sdmc:/3ds/fake08/";

-    _cartDirectory = "/p8carts/";
+    _cartDirectory = "/p8carts";

     struct stat st = {0};

@@ -716,14 +716,14 @@ vector<string> Host::listcarts(){
     //force to SD card root
     chdir("sdmc:/");

-    DIR* dir = opendir("/p8carts");
+    DIR* dir = opendir(_cartDirectory.c_str());
     struct dirent *ent;

     if (dir) {
         /* print all the files and directories within directory */
         while ((ent = readdir (dir)) != NULL) {
             if (isCartFile(ent->d_name)){
-                carts.push_back(_cartDirectory + ent->d_name);
+                carts.push_back(_cartDirectory + "/" + ent->d_name);
             }
         }
         closedir (dir);