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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user