add Switch to python launcher

This commit is contained in:
cuu
2018-12-05 19:43:07 +08:00
parent aca420aab7
commit bc8193c793
4 changed files with 91 additions and 27 deletions

View File

@@ -10,6 +10,7 @@ import (
"bytes"
"io"
"strconv"
"syscall"
"github.com/cuu/gogame/display"
@@ -206,7 +207,7 @@ func GetUid(path string) int {
func CheckBattery() int {
batinfos,err := ReadLines(sysgo.Battery)
if err == nil {
for i,v := range batinfos {
for _,v := range batinfos {
if strings.HasPrefix(v,"POWER_SUPPLY_CAPACITY") {
parts := strings.Split(v,"=")
if len(parts) > 1 {