Skip to content

Commit

Permalink
Fix modded ifs files in jubeat
Browse files Browse the repository at this point in the history
  • Loading branch information
mon committed Mar 2, 2024
1 parent 38958fa commit e66e846
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('layeredfs', 'c', 'cpp', version: '3.1',
project('layeredfs', 'c', 'cpp', version: '3.2',
default_options: [
'cpp_std=c++17',
'buildtype=release',
Expand Down
9 changes: 9 additions & 0 deletions src/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,15 @@ int hook_avs_fs_mount(const char* mountpoint, const char* fsroot, const char* fs
log_verbose("mounting %s to %s with type %s and args %s", fsroot, mountpoint, fstype, args);
ramfs_demangler_on_fs_mount(mountpoint, fsroot, fstype, args);

// In new jubeat, a modded IFS file will be loaded as such:
// pkfs_open data/music/xxxx/bsc.eve
// mounting /data/ifs_pack/xxxx/yyyy_msc.ifs to /data/imagefs/msc/xxxx with type imagefs and args (NULL)
// avs_fs_open /data/ifs_pack/xxxx/yyyy_msc.ifs
// ... Because of this, we have to go back to hooking avs_fs_open when a mount is seen.
// It shouldn't affect old-beat (the reason pkfs hooks exist at all) because
// they use .bin files instead of .ifs files.
inside_pkfs_hook = false;

return avs_fs_mount(mountpoint, fsroot, fstype, args);
}

Expand Down

0 comments on commit e66e846

Please sign in to comment.