Andrea Ciliberti
ea80b57880
Added check for Console existence on panic
3 years ago
Meziu
1b743711d8
Update ctru-rs/src/lib.rs
...
Co-authored-by: Ian Chamberlain <ian-h-chamberlain@users.noreply.github.com>
3 years ago
Andrea Ciliberti
32d17e552a
Distinct behaviour for main and non-main threads
3 years ago
Andrea Ciliberti
85f901f36e
Alternative panic hook exit
3 years ago
Ian Chamberlain
5d86cfb007
Update time_rtc example to use `time` crate
3 years ago
Andrea Ciliberti
5bdb0a4db1
Added thread-basic example
3 years ago
Andrea Ciliberti
fe7dd31294
Renamed time-rtc example
3 years ago
AzureMarker
1c66a1c770
Use cfg-if
3 years ago
AzureMarker
4b95068fac
Remove the sdmc module
...
The SD card is automatically mounted by libctru on startup, so this
isn't needed anymore.
3 years ago
Ian Chamberlain
03678e0e95
Update example for Console API change
3 years ago
Ian Chamberlain
b504b6f988
Address PR comments
3 years ago
AzureMarker
39de31a662
Support conditional compilation of RomFS
...
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).
3 years ago
AzureMarker
1e7326b32b
Add RomFS support to the file-explorer example (by jumping to romfs:/)
3 years ago
AzureMarker
07ed1dc196
Add basic RomFS support
...
Seems to crash the 3DS if there is no actual RomFS data in the 3dsx
file, so there's room for improvement.
3 years ago
AzureMarker
ea4410a0c4
Make standard gfx calls on every frame in file-explorer
3 years ago
Andrea Ciliberti
366db9e046
Fixed clippy suggestions
3 years ago
AzureMarker
564d75e518
Add file-explorer example to test file system via std
...
Note: there's some issue in release mode causing a segfault.
Currently investigating.
3 years ago
Andrea Ciliberti
2bc475db68
Formatting
3 years ago
Andrea Ciliberti
29b7a7d08d
Added network-sockets example
3 years ago
Andrea Ciliberti
46a615cae5
Substituted hello-world example
3 years ago
Andrea Ciliberti
4a48926ee6
gfx-wide-mode example working
3 years ago
Andrea Ciliberti
38fef16309
Simple examples working with new Screen impl
3 years ago
Andrea Ciliberti
526f7cc25e
Console requires mutable Screen
3 years ago
Meziu
a879e02db5
Update ctru-rs/src/console.rs
...
Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>
3 years ago
Ian Chamberlain
5502758255
Update ctru-rs/Cargo.toml
...
Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>
3 years ago
Andrea Ciliberti
2ed31e5653
Removed PhantomData dependency
3 years ago
Andrea Ciliberti
09271676b6
Fixed ownership of Screen borrow for Console
3 years ago
Meziu
ae00883787
Update ctru-rs/src/gfx.rs
...
Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>
3 years ago
Andrea Ciliberti
04a35e4a6f
Fixed Screen accessibility
3 years ago
Andrea Ciliberti
53aa05a003
Split Screen enum into structs and trait
3 years ago
Ian Chamberlain
e06d7ac9be
Add time_rtc example
3 years ago
Andrea Ciliberti
45bf4b5ec7
Separate screens and internal mutability for Gfx
3 years ago
Andrea Ciliberti
8fbad7cfeb
Added mutability checks for Gfx
3 years ago
AzureMarker
1c5c72477c
Import Screen in examples to improve consistency
3 years ago
AzureMarker
67b15b928a
Tie the lifetime of Gfx to Console
...
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).
3 years ago
Andrea Ciliberti
d021da0c6f
Fixed examples for latest Console changes
3 years ago
Andrea Ciliberti
cbdd9d26c3
Require Gfx instance for Console::init
3 years ago
Andrea Ciliberti
a8b00bbed3
Removed backtrace console
3 years ago
AzureMarker
c3ae3a1abc
Select an empty console when dropping the selected console
3 years ago
AzureMarker
9a45f575c8
Add back initialization of default console in Console::drop
...
If the default console isn't initialized then it will segfault.
3 years ago
AzureMarker
12ae54c605
Add some more explanation to Console::drop
3 years ago
AzureMarker
84ef934223
Add back slightly simpler Console::drop
...
This is needed for soundness. Otherwise libctru will have a dangling
pointer, and will write to it when printing.
3 years ago
AzureMarker
e4b2e701b6
Run rustfmt
3 years ago
AzureMarker
f2b1b75224
Apply Clippy suggestions
3 years ago
AzureMarker
ffb239853e
Update to Rust 2021
3 years ago
AzureMarker
a16234c4e1
Run cargo fix to make compatible with Rust 2021
3 years ago
AzureMarker
72dafc7fc2
Update crates to 2018
3 years ago
AzureMarker
f547addf21
Use ctru_sys crate name instead of libctru, and run cargo fix --edition
...
Including --edition-idioms.
3 years ago
AzureMarker
07fe052d9a
Add wide screen mode support to Gfx
3 years ago
Andrea Ciliberti
03c7a772c5
Dedicated BackTrace Console instead of default
3 years ago