From 1393e8c733ccefb687d588d53627878147190b1c Mon Sep 17 00:00:00 2001 From: Id405 <8o7wermobile@gmail.com> Date: Fri, 10 May 2019 21:02:54 -0800 Subject: Delete monitor.go --- win/monitor.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 win/monitor.go diff --git a/win/monitor.go b/win/monitor.go deleted file mode 100644 index 931484a..0000000 --- a/win/monitor.go +++ /dev/null @@ -1,42 +0,0 @@ -package win - -import ( - "github.com/faiface/mainthread" - "github.com/go-gl/glfw/v3.2/glfw" -) - - -// Holds information on a monitor -type Monitor struct { - Width, Height int - RefreshRate int -} - -// Returns a struct containing information about the primary monitor -func GetPrimaryMonitor() (Monitor, error) { - returns := mainthread.CallVal( func() interface{} { - err := glfw.Init() - if err != nil { - return err - } - - return glfw.GetPrimaryMonitor().GetVideoMode() - }) - - monitor := Monitor{0, 0, 0} - var err error = nil - - switch v := returns.(type) { - case *glfw.VidMode: - videoMode := v - - width := videoMode.Width - height := videoMode.Height - refreshRate := videoMode.RefreshRate - monitor = Monitor{width, height, refreshRate} - case error: - err = v - } - - return monitor, err -} -- cgit v1.2.3