Implemented getMonitorScale
This commit is contained in:
@ -98,6 +98,19 @@ pub fn Window(comptime TUserData: type) type {
|
||||
pub fn setViewport(self: Window(TUserData), offset_x: u32, offset_y: u32, width: u32, height: u32) bool {
|
||||
return c.mfb_set_viewport(self.cwin, offset_x, offset_y, width, height);
|
||||
}
|
||||
|
||||
pub const MonitorScale = struct {
|
||||
x: f32,
|
||||
y: f32,
|
||||
};
|
||||
pub fn getMonitorScale(self: Window(TUserData)) MonitorScale {
|
||||
var scale = MonitorScale{
|
||||
.x = undefined,
|
||||
.y = undefined,
|
||||
};
|
||||
c.mfb_get_monitor_scale(self.cwin, &scale.x, &scale.y);
|
||||
return scale;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user