Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions d3d12/apps/leonida/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ pub fn run(
drop(prepared);
drop(original);
leonida_hle::runtime::set_main_image(image.base());
// `LEONIDA_CALL_TRACE=<path>`: every import call of the title goes to that file (call_trace.rs); the file must be
// new, and the title does not start without it. Unset: nothing changes.
if leonida_loader::call_trace::open_from_env()? {
leonida_loader::call_trace::add_module(
"game",
image.base(),
image.info().size_of_image as usize,
);
}
// Where the Lua mods' memory scan looks (`LEONIDA_LUA=0`: nothing reads it).
leonida_lua::set_image(image.base(), image.info().size_of_image as usize);
leonida_hle::runtime::set_image_path(image.base(), exe);
Expand Down Expand Up @@ -123,6 +132,7 @@ pub fn run(
leonida_hle::modules::ffx::set_real_create(real);
}
println!("title dll {name} at {:#x}", dll.base());
leonida_loader::call_trace::add_module(name, dll.base(), dll.info().size_of_image as usize);
leonida_hle::runtime::set_image_path(dll.base(), &title_dir.join(name));
}
let imported: Vec<&str> = image
Expand Down Expand Up @@ -449,6 +459,11 @@ impl LateDlls {
"title dll {name} at {:#x} (loaded by the title)",
dll.base()
);
leonida_loader::call_trace::add_module(
name,
dll.base(),
dll.info().size_of_image as usize,
);
show(name, dll.bind_imports(&resolver, self.policy)?);
set_image_path(dll.base(), &self.title_dir.join(name));
}
Expand Down
2 changes: 2 additions & 0 deletions d3d12/crates/leonida-loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ blake3.workspace = true
windows-sys = { workspace = true, features = [
"Wdk_System_Threading",
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Diagnostics_Debug",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_Kernel",
Expand Down
Loading
Loading