Skip to content

Commit

Permalink
Lock hooks and injection behind feature flags (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
vars1ty authored Jun 29, 2023
1 parent 605b2a5 commit 8f12735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ default-target = "x86_64-pc-windows-msvc"
targets = ["x86_64-pc-windows-msvc"]

[features]
default = ["dx9", "dx11", "dx12", "opengl3"]
default = ["dx9", "dx11", "dx12", "opengl3", "inject"]
dx9 = []
dx11 = []
dx12 = []
opengl3 = []
inject = []

# Hook examples
#
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
//! [`imgui`]: https://docs.rs/imgui/0.8.0/imgui/

pub(crate) mod common;
#[cfg(feature = "dx11")]
pub mod dx11;
#[cfg(feature = "dx12")]
pub mod dx12;
#[cfg(feature = "dx9")]
pub mod dx9;
#[cfg(feature = "opengl3")]
pub mod opengl3;

pub use common::{ImguiRenderLoop, ImguiRenderLoopFlags};
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
mod mh;

pub mod hooks;
#[cfg(feature = "inject")]
pub mod inject;
pub mod renderers;

Expand Down

0 comments on commit 8f12735

Please sign in to comment.