feat: open window with size of workarea
parent
6f42b35e14
commit
197756e5c3
|
@ -132,8 +132,12 @@ pub fn main() !void {
|
|||
seizer.backend.glfw.c.glfwWindowHint(seizer.backend.glfw.c.GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
seizer.backend.glfw.c.glfwWindowHint(seizer.backend.glfw.c.GLFW_CONTEXT_VERSION_MINOR, 0);
|
||||
|
||||
const primary_monitor = seizer.backend.glfw.c.glfwGetPrimaryMonitor();
|
||||
var workarea_size: [2]c_int = undefined;
|
||||
seizer.backend.glfw.c.glfwGetMonitorWorkarea(primary_monitor, null, null, &workarea_size[0], &workarea_size[1]);
|
||||
|
||||
// Open window
|
||||
const window = seizer.backend.glfw.c.glfwCreateWindow(720, 720, "Rummy", null, null) orelse return error.GlfwCreateWindow;
|
||||
const window = seizer.backend.glfw.c.glfwCreateWindow(workarea_size[0], workarea_size[1], "Rummy", null, null) orelse return error.GlfwCreateWindow;
|
||||
errdefer seizer.backend.glfw.c.glfwDestroyWindow(window);
|
||||
|
||||
seizer.backend.glfw.c.glfwMakeContextCurrent(window);
|
||||
|
|
Loading…
Reference in New Issue