Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Bump a bunch of versions on different dependencies (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankvdStam authored Jul 12, 2024
1 parent 2260324 commit 4b5ce2a
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 29 deletions.
20 changes: 10 additions & 10 deletions soulmemory-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ crate-type = ["lib", "cdylib"]
[dependencies]
ilhook = "2.1.0"

mem-rs = "0.1.4"
mem-rs = "0.1.7"
#mem-rs = { path="C:/projects/mem-rs" }
chrono = "0.4.19"
lazy_static = "1.4.0"
chrono = "0.4.38"
lazy_static = "1.5.0"

serde = { version = "1.0.199", features = ["derive"] }
serde_json = "1.0.116"
serde = { version = "1.0.204", features = ["derive"] }
serde_json = "1.0.120"

imgui = { version = "0.11.0", features = ["tables-api"] }
hudhook = "0.5.0"
imgui = { version = "0.12.0", features = ["tables-api"] }
hudhook = "0.7.1"

log = "0.4.17"
log4rs = {version = "1.1.1", features = ["all_components" ] }
log = "0.4.22"
log4rs = {version = "1.3.0", features = ["all_components" ] }
rand = "0.8.5"

[dependencies.windows]
version = "0.56.0"
version = "0.58.0"
features = [
"Win32_Foundation",
"Win32_System_Memory",
Expand Down
2 changes: 1 addition & 1 deletion soulmemory-rs/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Default for App
App
{
game: Box::new(MockGame::new()),
hmodule: HINSTANCE(0),
hmodule: HINSTANCE(std::ptr::null_mut()),
server: Server::default(),
widgets: Vec::new(),
}
Expand Down
2 changes: 1 addition & 1 deletion soulmemory-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::render_hooks::RenderHooks;

pub use app::App;

static mut HMODULE: HINSTANCE = HINSTANCE(0);
static mut HMODULE: HINSTANCE = HINSTANCE(std::ptr::null_mut());

#[no_mangle]
#[allow(non_snake_case)]
Expand Down
16 changes: 8 additions & 8 deletions soulmemory-rs/src/render_hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use hudhook::HINSTANCE as HUDHOOK_HINSTANCE;
//use hudhook::{windows::Win32::Foundation::HINSTANCE as HUDHOOK_HINSTANCE, ImguiRenderLoop};
use hudhook::*;
use hudhook::Hudhook;
use hudhook::hooks::{ImguiRenderLoop};
use hudhook::hooks::dx11::ImguiDx11Hooks;
use hudhook::hooks::dx12::ImguiDx12Hooks;
use hudhook::hooks::dx9::ImguiDx9Hooks;
Expand All @@ -33,19 +33,19 @@ impl RenderHooks
let instance = App::get_instance();
let app = instance.lock().unwrap();

let render_hooks = RenderHooks::new();
let mut builder = Hudhook::builder();

builder = match app.game.get_dx_version()
{
DxVersion::Dx9 => builder.with(RenderHooks::new().into_hook::<ImguiDx9Hooks>()),
DxVersion::Dx11 => builder.with(RenderHooks::new().into_hook::<ImguiDx11Hooks>()),
DxVersion::Dx12 => builder.with(RenderHooks::new().into_hook::<ImguiDx12Hooks>()),
DxVersion::Dx9 => builder.with::<ImguiDx9Hooks>(render_hooks),
DxVersion::Dx11 => builder.with::<ImguiDx11Hooks>(render_hooks),
DxVersion::Dx12 => builder.with::<ImguiDx12Hooks>(render_hooks),
};

//builder.with_hmodule(HUDHOOK_HINSTANCE(app.hmodule.0));

if let Err(e) = builder.with_hmodule(HUDHOOK_HINSTANCE(app.hmodule.0))
.build()
.apply()
if let Err(e) = builder.build().apply()
{
panic!("{:?}", e)
}
Expand Down
2 changes: 1 addition & 1 deletion soulmemory-rs/src/tas/tas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn get_xinput_get_state_fn_address() -> u64
for xinput_version in xinput_versions
{
let hmodule = GetModuleHandleA(xinput_version.as_ptr());
if hmodule != HINSTANCE(0)
if hmodule != HINSTANCE(std::ptr::null_mut())
{
let address = GetProcAddress(hmodule.0 as *const c_void, "XInputGetState\0".as_ptr());
info!("{} address 0x{:x}", xinput_version, address as u64);
Expand Down
14 changes: 7 additions & 7 deletions test-window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
copypasta = "0.8"
copypasta = "0.10.1"
glium = { version = "0.34.0", default-features = true, features = ["glutin_backend"] }
image = "0.23"
imgui = "0.11.0"
imgui-glium-renderer = "0.11.0"
image = "0.25.1"
imgui = "0.12.0"
imgui-glium-renderer = "0.12.0"

winit = { version = "0.29.3", default-features = false }
winit = { version = "0.29.15", default-features = false }

soulmemory-rs = { path = "../soulmemory-rs" }

Expand All @@ -22,12 +22,12 @@ soulmemory-rs = { path = "../soulmemory-rs" }
# imgui-examples -> glium -> glutin -> wayland-client -> scoped-tls
# so not worth bumping MSRV for this basically to keep CI happy
# FIXME: Remove this for imgui-rs v0.10 and bump MSRV
scoped-tls = "=1.0.0"
#scoped-tls = "=1.0.0"
rand = "0.9.0-alpha.1"
chrono = "0.4.22"

[dependencies.windows]
version = "0.56.0"
version = "0.58.0"
features = [
"Win32_Foundation",
"Win32_System_Memory",
Expand Down
2 changes: 1 addition & 1 deletion test-window/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use soulmemory_rs::games::*;
mod support;

fn main() {
App::init(&String::from("mockgame.exe"), HINSTANCE(0));
App::init(&String::from("mockgame.exe"), HINSTANCE(std::ptr::null_mut()));

let system = support::init("test window");
system.main_loop(move |run, ui|
Expand Down
1 change: 1 addition & 0 deletions test-window/src/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn init(title: &str) -> System {
};
let event_loop = EventLoop::new().expect("Failed to create EventLoop");


let builder = WindowBuilder::new()
.with_title(title)
.with_inner_size(LogicalSize::new(1920, 1080));
Expand Down

0 comments on commit 4b5ce2a

Please sign in to comment.