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
|
||||
|
||||
/*
|
||||
|
@ -13,7 +16,6 @@ import "C"
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -33,11 +35,7 @@ func TraceLog(logLevel TraceLogLevel, text string, v ...interface{}) {
|
|||
|
||||
// HomeDir - Returns user home directory
|
||||
// NOTE: On Android this returns internal data path and must be called after InitWindow
|
||||
func HomeDir() string {
|
||||
if runtime.GOOS == "android" {
|
||||
return getInternalStoragePath()
|
||||
}
|
||||
|
||||
func HomeDir() string {
|
||||
if homeDir, err := os.UserHomeDir(); err != nil {
|
||||
return homeDir
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue