Example #1
0
//GetName returns a human-readable name of the monitor, encoded as UTF-8.
func (m *Monitor) GetName() (string, error) {
	mn := C.glfwGetMonitorName(m.data)
	if mn == nil {
		return "", errors.New("Can't get monitor name.")
	}

	return C.GoString(mn), nil
}
Example #2
0
// GetName returns a human-readable name of the monitor, encoded as UTF-8.
func (m *Monitor) GetName() string {
	mn := C.glfwGetMonitorName(m.data)
	panicError()
	if mn == nil {
		return ""
	}
	return C.GoString(mn)
}