示例#1
0
文件: power.go 项目: krig/Go-SDL2
// Returns current power supply details
func GetPowerInfo() int {
	return int(C.SDL_GetPowerInfo(nil, nil))
}
示例#2
0
文件: power.go 项目: JalfResi/go-sdl2
func GetPowerInfo() (int, int, int) {
	_secs := C.int(0)
	_percent := C.int(0)
	_state := C.SDL_GetPowerInfo(&_secs, &_percent)
	return (int)(_state), (int)(_secs), (int)(_percent)
}