Skip to content

Commit

Permalink
✏️ fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyCh3n committed Jul 20, 2022
1 parent 896d191 commit bbc8c54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 46 deletions.
44 changes: 1 addition & 43 deletions src/adl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{

use crate::{
adl_define::*,
winapi::{get_proc_address, load_library, ModuleHandle, free_library},
winapi::{free_library, get_proc_address, load_library, ModuleHandle},
};

unsafe extern "C" fn adl_main_memory_alloc(i_size: c_int) -> *mut c_void {
Expand Down Expand Up @@ -96,45 +96,3 @@ impl Drop for ADL {
}
}
}

/* pub unsafe fn initialize_adl(module: &ModuleHandle) -> Result<ADLLibrary> {
Ok(ADLLibrary {
module_handle: *module,
adl_main_control_create: transmute(get_proc_address(
&module,
b"ADL_Main_Control_Create\0",
)?),
adl_main_control_destroy: transmute(get_proc_address(
&module,
b"ADL_Main_Control_Destroy\0",
)?),
adl_adapter_number_of_adapters_get: transmute(get_proc_address(
&module,
b"ADL_Adapter_NumberOfAdapters_Get\0",
)?),
adl_adapter_adapterinfo_get: transmute(get_proc_address(
&module,
b"ADL_Adapter_AdapterInfo_Get\0",
)?),
adl2_overdrive_caps: transmute(get_proc_address(
&module,
b"ADL2_Overdrive_Caps\0",
)?),
adl2_overdriven_capabilitiesx2_get: transmute(get_proc_address(
&module,
b"ADL2_OverdriveN_CapabilitiesX2_Get\0",
)?),
adl2_overdriven_fancontrol_get: transmute(get_proc_address(
&module,
b"ADL2_OverdriveN_FanControl_Get\0",
)?),
adl2_overdriven_powerlimit_get: transmute(get_proc_address(
&module,
b"ADL2_OverdriveN_PowerLimit_Get\0",
)?),
adl2_overdriven_temperature_get: transmute(get_proc_address(
&module,
b"ADL2_OverdriveN_Temperature_Get\0",
)?),
})
} */
3 changes: 0 additions & 3 deletions src/bin/over_drive_n/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,5 @@ unsafe fn unsafe_main() -> Result<()> {
print_odn_temp_parameters(&adl, lp_adapter_info)?;

dealloc(lp_adapter_info_raw as *mut u8, layout);

/* (adl.adl_main_control_destroy)();
free_library(&h_dll); */
Ok(())
}

0 comments on commit bbc8c54

Please sign in to comment.