core: Windows needed heap-allocated context
This commit is contained in:
parent
06aec428de
commit
5bcdcadb74
1 changed files with 3 additions and 2 deletions
|
|
@ -234,9 +234,10 @@ fn initWindow(
|
|||
.from_windows_hwnd = &native.surface_descriptor_from_hwnd,
|
||||
} };
|
||||
|
||||
const context: Context = .{ .core = core, .window_id = window_id };
|
||||
const context = try core.allocator.create(Context);
|
||||
context.* = .{ .core = core, .window_id = window_id };
|
||||
|
||||
_ = w.SetWindowLongPtrW(native_window, w.GWLP_USERDATA, @bitCast(@intFromPtr(&context)));
|
||||
_ = w.SetWindowLongPtrW(native_window, w.GWLP_USERDATA, @bitCast(@intFromPtr(context)));
|
||||
|
||||
restoreWindowPosition(core, window_id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue