mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-19 10:22:41 +01:00
Compatible with launcher's action.config
This commit is contained in:
@@ -6,15 +6,15 @@ import (
|
||||
)
|
||||
|
||||
type ActionConfig struct {
|
||||
ROM string `json:"ROM"`
|
||||
ROM_SO string `json:"ROM_SO"`
|
||||
EXT []string `json:"EXT"`
|
||||
EXCLUDE []string `json:"EXCLUDE"`
|
||||
FILETYPE string `json:"FILETYPE"` // defalut is file
|
||||
LAUNCHER string `json:"LAUNCHER"`
|
||||
TITLE string `json:"TITLE"` // defaut is Game
|
||||
SO_URL string `json:"SO_URL"`
|
||||
RETRO_CONFIG string `json:"RETRO_CONFIG"`
|
||||
ROM string `ini:"ROM"`
|
||||
ROM_SO string `ini:"ROM_SO"`
|
||||
EXT []string `ini:"EXT,omitempty"`
|
||||
EXCLUDE []string `ini:"EXCLUDE,omitempty"`
|
||||
FILETYPE string `ini:"FILETYPE"` // defalut is file
|
||||
LAUNCHER string `ini:"LAUNCHER"`
|
||||
TITLE string `ini:"TITLE"` // defaut is Game
|
||||
SO_URL string `ini:"SO_URL"`
|
||||
RETRO_CONFIG string `ini:"RETRO_CONFIG"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ var (
|
||||
)
|
||||
|
||||
var (
|
||||
Emulator_flag = "action.json"
|
||||
Emulator_flag = "action.config"
|
||||
Plugin_flag = "plugin.json"
|
||||
)
|
||||
|
||||
@@ -64,7 +64,7 @@ func (self *SkinManager) Init() {
|
||||
self.Colors["White"] = &color.Color{255,255,255,255}
|
||||
self.Colors["Black"] = &color.Color{0,0,0,255}
|
||||
|
||||
fname := "skin/"+sysgo.SKIN+"/config.cfg"
|
||||
fname := "skin/"+sysgo.SKIN+"/config.ini"
|
||||
|
||||
load_opts := ini.LoadOptions{
|
||||
IgnoreInlineComment:true,
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"strconv"
|
||||
"syscall"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/cuu/gogame/display"
|
||||
|
||||
@@ -260,6 +261,16 @@ func System(cmd string) string {
|
||||
return ret
|
||||
}
|
||||
|
||||
func ArmSystem(cmd string) string {
|
||||
|
||||
if strings.Contains(runtime.GOARCH,"arm") == true {
|
||||
return System(cmd)
|
||||
}else {
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func SystemTrim(cmd string) string {
|
||||
ret := ""
|
||||
out,err := exec.Command("bash","-c",cmd).Output()
|
||||
|
||||
Reference in New Issue
Block a user