{mach,examples}: followups to getWindowSize / getFramebufferSize (#322)
* followup to window size saving, getWindowSize and getFramebufferSize no longer return errors * updated the examples
This commit is contained in:
parent
6bfb16554a
commit
3961073084
5 changed files with 10 additions and 10 deletions
|
|
@ -44,14 +44,14 @@ pub const Core = struct {
|
|||
|
||||
pub fn setShouldClose(_: *Core, _: bool) void {}
|
||||
|
||||
pub fn getFramebufferSize(core: *Core) !structs.Size {
|
||||
pub fn getFramebufferSize(core: *Core) structs.Size {
|
||||
return structs.Size{
|
||||
.width = js.machCanvasGetFramebufferWidth(core.id),
|
||||
.height = js.machCanvasGetFramebufferHeight(core.id),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn getWindowSize(core: *Core) !structs.Size {
|
||||
pub fn getWindowSize(core: *Core) structs.Size {
|
||||
return structs.Size{
|
||||
.width = js.machCanvasGetWindowWidth(core.id),
|
||||
.height = js.machCanvasGetWindowHeight(core.id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue