Update utils.go
This commit is contained in:
parent
c1f48ea0ac
commit
76f1c56135
1 changed files with 4 additions and 6 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
//go:build !android
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package rl
|
package rl
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -13,7 +16,6 @@ import "C"
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,11 +35,7 @@ func TraceLog(logLevel TraceLogLevel, text string, v ...interface{}) {
|
||||||
|
|
||||||
// HomeDir - Returns user home directory
|
// HomeDir - Returns user home directory
|
||||||
// NOTE: On Android this returns internal data path and must be called after InitWindow
|
// NOTE: On Android this returns internal data path and must be called after InitWindow
|
||||||
func HomeDir() string {
|
func HomeDir() string {
|
||||||
if runtime.GOOS == "android" {
|
|
||||||
return getInternalStoragePath()
|
|
||||||
}
|
|
||||||
|
|
||||||
if homeDir, err := os.UserHomeDir(); err != nil {
|
if homeDir, err := os.UserHomeDir(); err != nil {
|
||||||
return homeDir
|
return homeDir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue