Skip to content

Commit

Permalink
Create 'userdata' directory on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Senryoku committed May 23, 2024
1 parent 0731ae5 commit 0a8a9b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dreamcast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ pub const Dreamcast = struct {
// dc.boot[0x077B] = 0x00;
// dc.boot[0x077A] = 0x09;

// Create 'userdata' folder if it doesn't exist
try std.fs.cwd().makePath("userdata");

// Load Flash
const user_flash_path = "./userdata/flash.bin";
var flash_file = std.fs.cwd().openFile(user_flash_path, .{}) catch |err| f: {
Expand Down

0 comments on commit 0a8a9b4

Please sign in to comment.