File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 44 .dependencies = .{
55 .zgui = .{
66 .url = "https://github.com/PMarcL/zgui/archive/refs/heads/sdl3gpu-backend.tar.gz" ,
7- .hash = "1220a2c6d3978249cb9d64905f36236bad95a1f97c2c5c89ec513fa6eb88518f6c5d " ,
7+ .hash = "122052612a864529ee98c95d7efc55ccd3d3f214a52b9352e0c773473ba92b6b7901 " ,
88 },
99 },
1010 .paths = .{
Original file line number Diff line number Diff line change @@ -81,11 +81,12 @@ pub fn main() !void {
8181
8282 var fb_width : c_int = 0 ;
8383 var fb_height : c_int = 0 ;
84- if (! c .SDL_GetWindowSizeInPixels (window , & fb_width , & fb_height )) {
84+ if (! c .SDL_GetWindowSize (window , & fb_width , & fb_height )) {
8585 std .log .err ("SDL_GetWindowSizeInPixels failed: {s}\n " , .{c .SDL_GetError ()});
8686 return ;
8787 }
88- zgui .backend .newFrame (@intCast (fb_width ), @intCast (fb_height ));
88+ const fb_scale = c .SDL_GetWindowDisplayScale (window );
89+ zgui .backend .newFrame (@intCast (fb_width ), @intCast (fb_height ), fb_scale );
8990
9091 // Show a simple window
9192 zgui .setNextWindowPos (.{ .x = 20.0 , .y = 20.0 , .cond = .first_use_ever });
You can’t perform that action at this time.
0 commit comments