mirror of
https://github.com/libretro/go-nanoarch.git
synced 2024-11-27 10:30:35 +00:00
Use flags to load the core
This commit is contained in:
parent
bcfa58b538
commit
a8cac9892f
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/draw"
|
||||
@ -30,8 +31,10 @@ func init() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
var corePath = flag.String("L", "", "Path to the libretro core")
|
||||
flag.Parse()
|
||||
|
||||
cstr := C.CString("snes9x_libretro.dylib")
|
||||
cstr := C.CString(*corePath)
|
||||
defer C.free(unsafe.Pointer(cstr))
|
||||
h := C.dlopen(cstr, C.RTLD_NOW)
|
||||
if h == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user