Update utils.go

This commit is contained in:
JupiterRider 2022-10-25 21:58:31 +02:00 committed by GitHub
parent c1f48ea0ac
commit 76f1c56135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}