fix: windows build with zig 0.14.0-dev.3039
This commit is contained in:
parent
53045123c6
commit
d503f3c197
5 changed files with 44 additions and 10 deletions
|
@ -41,12 +41,12 @@ pub const Font = struct {
|
|||
);
|
||||
if (hr < 0) std.debug.panic(
|
||||
"CreateTextFormat '{}' height {d} failed, hresult=0x{x}",
|
||||
.{ std.unicode.fmtUtf16le(face.slice()), size, @as(u32, @bitCast(hr)) },
|
||||
.{ std.unicode.fmtUtf16Le(face.slice()), size, @as(u32, @bitCast(hr)) },
|
||||
);
|
||||
}
|
||||
errdefer _ = text_format.IUnknown.Release();
|
||||
|
||||
const cell_size = blk: {
|
||||
const cell_size: XY(u16) = blk: {
|
||||
var text_layout: *win32.IDWriteTextLayout = undefined;
|
||||
{
|
||||
const hr = global.dwrite_factory.CreateTextLayout(
|
||||
|
|
|
@ -145,7 +145,7 @@ fn getConfig() *gui_config {
|
|||
}
|
||||
|
||||
fn getFieldDefault(field: std.builtin.Type.StructField) ?*const field.type {
|
||||
return @alignCast(@ptrCast(field.default_value orelse return null));
|
||||
return @alignCast(@ptrCast(field.default_value_ptr orelse return null));
|
||||
}
|
||||
|
||||
fn getDefaultFontFace() FontFace {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue