3ds-hbmenu icon indicating copy to clipboard operation
3ds-hbmenu copied to clipboard

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

Open HyperDir opened this issue 8 months ago • 1 comments

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.

HyperDir avatar Jun 20 '24 02:06 HyperDir