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

Netbooted 3dsx has different working directory from manually run 3dsx #97

Open
HyperDir opened this issue Jun 20, 2024 · 1 comment
Open

Comments

@HyperDir
Copy link

Bug Report

What's the issue you encountered?

When netbooting a .3dsx file, the current working directory seems to be set to SD root, whereas when running the .3dsx file from the SD, the working directory seems to be set to sdmc:/3ds.

I have made no changes to the devkitPro tooling.

How can the issue be reproduced?

  1. Create a basic 3DS console program.
  2. std::cout << std::filesystem::current_path() << std::endl;
  3. Launch program via hbmenu netloader and view output.
  4. Launch program from SD card via hbmenu and view output.

When netbooted, this prints "/", whereas when loaded from the SD card, it prints "sdmc:/3ds"

Environment?

Using an official Homebrew Launcher build (Rosalina 2.4.3).
Building test 3dsx on Windows 11.

Additional context?

User piepie62 on the Nintendo Homebrew Discord said that netbooting "gives you the argv[0] of 3dslink:/your_3dsx_name". They also mentioned that it was originally meant to allow accessing remote files, but that this was never implemented so it just defaults to the SD root. If this means that this is intended behaviour, then this bug report can be closed.

@WinterMute
Copy link
Member

WinterMute commented Sep 2, 2024

You can netboot the .3dsx and add -0 to place the cwd of that file anywhere. If you want sdmc:/3ds as your cwd then -0 sdmc:/3ds/ should work. The intended use was to allow the developer to upload data files anywhere on sd card then access them as if the .3dsx was launched from that path. I did intend at some point to extend 3dslink with a file server but never found the time/motivation for it. I can update 3dslink to use the default upload path as default argv.

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

No branches or pull requests

2 participants