fix android platform

This commit is contained in:
MatejMagat305 2024-03-23 17:11:00 +01:00 committed by GitHub
parent 7fd1b89d00
commit 7f0babcdd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View file

@ -7,12 +7,16 @@ package rl
#include "raylib.h"
#include <stdlib.h>
#include <android/asset_manager.h>
#include <android/native_activity.h>
#include <android_native_app_glue.h>
extern void android_init();
extern struct ANativeActivity *GetANativeActivity(void);
static AAssetManager* asset_manager;
static const char* internal_storage_path;
static const char* getInternalStoragePath(){
return GetANativeActivity()->internalDataPath;
}
*/
import "C"
@ -133,5 +137,5 @@ func (a *asset) Close() error {
}
func getInternalStoragePath() string {
return C.GoString(C.internal_storage_path)
return C.GoString(C.getInternalStoragePath())
}