Implement proper saving on Android
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions

This commit is contained in:
Lorenzooone
2025-04-30 16:49:38 +02:00
parent 77872ecf56
commit 405bba1cb8
6 changed files with 129 additions and 71 deletions

View File

@@ -5,6 +5,20 @@
#include <condition_variable>
#include <chrono>
#ifdef SFML_SYSTEM_ANDROID
#define ANDROID_COMPILATION
#else
// Possible to add more stuff here...
#ifdef ANDROID_COMPILATION
#undef ANDROID_COMPILATION
#endif
#endif
#ifdef ANDROID_COMPILATION
// These headers are needed for direct NDK/JDK interaction
#include <android/native_activity.h>
#endif
#if _MSC_VER && !__INTEL_COMPILER
#define PACKED
#define ALIGNED(x) alignas(x)
@@ -17,6 +31,12 @@
#define NAME "cc3dsfs"
#ifdef ANDROID_COMPILATION
#define PRINT_FUNCTION(...) __android_log_print(ANDROID_LOG_INFO, NAME, __VA_ARGS__)
#else
#define PRINT_FUNCTION(...) printf(__VA_ARGS__)
#endif
// This isn't precise, however we can use it...
// Use these to properly sleep, with small wakes to check if data is ready
#define USB_FPS 60
@@ -28,7 +48,12 @@
#define SIMPLE_RESET_DATA_INDEX -2
#define CREATE_NEW_FILE_INDEX -3
#ifdef ANDROID_COMPILATION
ANativeActivity* getAndroidNativeActivity();
#endif
std::string get_version_string(bool get_letter = true);
void ActualConsoleOutTextError(std::string out_string);
void ActualConsoleOutText(std::string out_string);
std::string LayoutNameGenerator(int index);
std::string LayoutPathGenerator(int index, bool created_proper_folder);
std::string load_layout_name(int index, bool created_proper_folder, bool &success);