If the user tries to open the RomFS when one has not been added, it will
result in a segfault (libctru doesn't verify the RomFS actually is
configured). This avoids that scenario when used in conjunction with
cargo-3ds.
An alternative approach would be to do as libctru does and read the 3dsx
file header, and use that to determine if RomFS is enabled at runtime.
This would require more code, but it would be more accurate and
compatible (wouldn't require a tool like cargo-3ds to ensure the RomFS
is added).
This prevents dropping the Gfx object before the console. We want to do
this because printing after dropping gfx doesn't do anything (gfx isn't
rendering the text anymore).
Note that even though Rust doesn't understand the relationship between
Console and println, even if you don't use the console variable Rust
will prevent Gfx dropping because Console's Drop code _might_ use the
Gfx object (it doesn't, but we get the error we want anyway).
This fixes the panic issue (not calling `panic_count::increase`) as well
as the missing debug info. The static lib contained a second copy of the
rust std, which caused these issues.
A side effect of removing this std is that the linker fix and pthread
library modules need to be "reachable" from the main module for Rust to
link them correctly. If the init methods of the modules are not called
somewhere, then a linker error will be emitted saying some symbols are
not found. The linker fix module didn't need this before because the
std included in the pthread static lib required those symbols, so they
were included. Now that the std is linked in later, Rust thinks these
symbols are unused (hence the init method).
Also moved the linker fix to be a dependency on ctru-rs. ctru-sys should
just be about interfacing with libctru.