Add function to retrieve the Android data path
This commit is contained in:
1 parent
2d5719fc64
commit
a2cd38d5b6
2 files changed
+11
No files matched your search
@@ -32,6 +32,10 @@ void stop_game();
|
||||
void close_engine();
|
||||
|
||||
i64 get_time();
|
||||
|
||||
#ifdef __ANDROID__
|
||||
const char *get_android_internal_storage(void);
|
||||
#endif // __ANDROID__
|
||||
// END GENERAL ENGINE API
|
||||
|
||||
// OBJECT MANAGEMENT API
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "SDL_rect.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_surface.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_ttf.h"
|
||||
#include "SDL_video.h"
|
||||
@@ -192,6 +193,12 @@ ObjectID add_object(void *object, EventHandlerPtr event_handler,
|
||||
update_func, render_func);
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
const char *get_android_internal_storage(void) {
|
||||
return SDL_AndroidGetInternalStoragePath();
|
||||
}
|
||||
#endif // __ANDROID__
|
||||
|
||||
void remove_object(ObjectID *id) {
|
||||
if (!(GameEngine.running) || !(GameEngine.object_store)) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user