Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusier committed Jun 15, 2022
1 parent 29fa3b0 commit a61fbfd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gameutil-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ version = "0.3.0"
edition = "2021"

[dependencies]
windows-dll = "0.3.0"
windows-dll = "0.4.0"
winapi = { version = "0.3.9", features = ["processthreadsapi"] }
sysinfo = "0.22.4"
sysinfo = "0.23.12"
nwg = {version = "^1.0.12", package = "native-windows-gui"}
livesplit-hotkey = "0.6.0"

Expand Down
2 changes: 1 addition & 1 deletion gameutil-rs/src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ mod app_gui {
.size(16)
.build(&mut font)
.expect("Failed to build font");
nwg::Font::set_global_default(windows_dll::Option::Some(font));
nwg::Font::set_global_default(Some(font));

// Controls
nwg::Window::builder()
Expand Down
8 changes: 4 additions & 4 deletions gameutil-rs/src/gui/sys.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{ffi::c_void, process::Command};
use sysinfo::{ProcessExt, System, SystemExt};
use sysinfo::{ProcessExt, System, SystemExt, PidExt};
use winapi::um::processthreadsapi::OpenProcess;
use windows_dll::dll;

Expand Down Expand Up @@ -119,13 +119,13 @@ pub fn idle(off: u8) {
.expect("failed to set power settings");
}

fn getpid(target: &str) -> u16 {
fn getpid(target: &str) -> u32 {
let mut sys = System::new();
sys.refresh_processes();
// list all pids and process names
for (pid, process) in sys.processes() {
if process.name() == target {
return *pid as u16;
return pid.to_owned().as_u32();
}
}
// don't want to return 0 if process not found
Expand All @@ -141,7 +141,7 @@ pub fn cleanworkingset() {
for process in sys.processes() {
// not very readable, so it goes:
// pid -> handle -> empty working set
EmptyWorkingSet(OpenProcess(0x1F0FFF, 0, *process.0 as u32));
EmptyWorkingSet(OpenProcess(0x1F0FFF, 0, process.0.as_u32()));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions sfc-fix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2021"
[dependencies]
winreg = "0.10.1"
rfd = "0.7.0"
base64 = "*"

[dependencies.regex]
version = "1.5.4"
Expand Down

0 comments on commit a61fbfd

Please sign in to comment.