More args in rust
This commit is contained in:
parent
78fb4ecbfc
commit
c334492ea9
14
src/lib.rs
14
src/lib.rs
@ -2,8 +2,11 @@ mod args;
|
||||
|
||||
use libc::{c_int, c_void};
|
||||
|
||||
const VERSION: &str = "2.0.0";
|
||||
|
||||
extern "C" {
|
||||
fn nmseffect_set_autodecrypt(_: c_int) -> c_void;
|
||||
fn nmseffect_set_clearscr(_: c_int) -> c_void;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@ -12,6 +15,17 @@ pub extern "C" fn rust_main() {
|
||||
|
||||
let args = args::parse_arguments().unwrap();
|
||||
|
||||
if args.version {
|
||||
println!("nms version {VERSION}");
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
if args.clear_screen {
|
||||
unsafe {
|
||||
nmseffect_set_clearscr(1);
|
||||
}
|
||||
}
|
||||
|
||||
if args.autodecrypt {
|
||||
unsafe {
|
||||
nmseffect_set_autodecrypt(1);
|
||||
|
Loading…
Reference in New Issue
Block a user