Skip to content

Commit

Permalink
Fix provenance in direct32 sample (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton authored Jan 7, 2025
1 parent 382ea56 commit 3566fca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/samples/windows/direct3d12/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use windows::{
Win32::UI::WindowsAndMessaging::*,
};

use std::mem::transmute;

trait DXSample {
fn new(command_line: &SampleCommandLine) -> Result<Self>
where
Expand Down Expand Up @@ -151,7 +149,7 @@ extern "system" fn wndproc<S: DXSample>(
match message {
WM_CREATE => {
unsafe {
let create_struct: &CREATESTRUCTA = transmute(lparam);
let create_struct: &CREATESTRUCTA = &*(lparam.0 as *const CREATESTRUCTA);
SetWindowLongPtrA(window, GWLP_USERDATA, create_struct.lpCreateParams as _);
}
LRESULT::default()
Expand Down

0 comments on commit 3566fca

Please sign in to comment.