Initial
This commit is contained in:
1 parent
2cff35f215
commit
1b0d534e6c
358 files changed
+253978
-74
No files matched your search
@@ -0,0 +1,85 @@
|
||||
|
||||
|
||||
mod host;
|
||||
mod image_watch;
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::frame::decline_coupled_interval;
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
pub use eonacat_xsbox_gpu::frame_phase;
|
||||
pub use eonacat_xsbox_gpu::memory_model;
|
||||
pub use eonacat_xsbox_gpu::frames_begun;
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::cpu_mirror_files;
|
||||
|
||||
pub mod awake;
|
||||
#[cfg(windows)]
|
||||
pub mod console_window;
|
||||
pub mod modules;
|
||||
#[cfg(windows)]
|
||||
pub mod mousehook;
|
||||
mod registry;
|
||||
pub mod runtime;
|
||||
|
||||
pub use host::HostPolicy;
|
||||
pub use registry::{HleExport, HleModule, registry};
|
||||
pub use eonacat_xsbox_gpu::console;
|
||||
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::dxr;
|
||||
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::streamline;
|
||||
pub use eonacat_xsbox_gpu::save_share;
|
||||
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::start_notice;
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::reserve_upload_space;
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
pub use eonacat_xsbox_gpu::replay;
|
||||
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::pipeline::known as known_pipelines;
|
||||
#[cfg(windows)]
|
||||
pub use eonacat_xsbox_gpu::heap_hooks;
|
||||
|
||||
use eonacat_xsbox_gpu::loader::{ImportResolver, Provenance, Resolution};
|
||||
use eonacat_xsbox_gpu::pe::ImportSymbol;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct HleResolver {
|
||||
pub host: HostPolicy,
|
||||
}
|
||||
|
||||
impl HleResolver {
|
||||
pub fn new(host: HostPolicy) -> Self {
|
||||
HleResolver { host }
|
||||
}
|
||||
|
||||
pub fn classify(&self, dll: &str, symbol: &ImportSymbol) -> Option<Provenance> {
|
||||
match self.resolve(dll, symbol) {
|
||||
Resolution::Found { provenance, .. } => Some(provenance),
|
||||
Resolution::Missing => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ImportResolver for HleResolver {
|
||||
fn resolve(&self, dll: &str, symbol: &ImportSymbol) -> Resolution {
|
||||
|
||||
if let Some(address) = registry::lookup(dll, &symbol.to_string()) {
|
||||
return Resolution::Found {
|
||||
address,
|
||||
provenance: Provenance::Hle,
|
||||
};
|
||||
}
|
||||
match self.host.resolve(dll, symbol) {
|
||||
Some(address) => Resolution::Found {
|
||||
address,
|
||||
provenance: Provenance::Host,
|
||||
},
|
||||
None => Resolution::Missing,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user