mirror of
https://github.com/libretro/go-nanoarch.git
synced 2024-11-23 16:29:45 +00:00
Start implementing coreLoadGame
This commit is contained in:
parent
4433544d7a
commit
0235e46e8e
18
nanoarch.go
18
nanoarch.go
@ -78,11 +78,29 @@ func coreLoad(sofile string) {
|
||||
retroInit()
|
||||
}
|
||||
|
||||
func coreLoadGame(filename string) {
|
||||
file, err := os.Open(filename)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fi, err := file.Stat()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
size := fi.Size()
|
||||
|
||||
fmt.Println(size)
|
||||
}
|
||||
|
||||
func main() {
|
||||
var corePath = flag.String("L", "", "Path to the libretro core")
|
||||
var gamePath = flag.String("G", "", "Path to the game")
|
||||
flag.Parse()
|
||||
|
||||
coreLoad(*corePath)
|
||||
coreLoadGame(*gamePath)
|
||||
|
||||
if err := glfw.Init(); err != nil {
|
||||
log.Fatalln("failed to initialize glfw:", err)
|
||||
|
Loading…
Reference in New Issue
Block a user