1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Save the settings in more cases to avoid losing setting changes (especially on Android) (#14266)

This commit is contained in:
grorp
2024-01-23 21:33:27 +01:00
committed by GitHub
parent f6ecd931dc
commit a29d3cf074
4 changed files with 55 additions and 4 deletions

View File

@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "config.h"
#include "filesys.h"
#include "log.h"
#include "settings.h"
#include <sstream>
#include <exception>
@@ -39,6 +40,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
extern int main(int argc, char *argv[]);
extern "C" JNIEXPORT void JNICALL
Java_net_minetest_minetest_GameActivity_saveSettings(JNIEnv* env, jobject /* this */) {
if (!g_settings_path.empty())
g_settings->updateConfigFile(g_settings_path.c_str());
}
namespace porting {
// used here:
void cleanupAndroid();