mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Save the settings in more cases to avoid losing setting changes (especially on Android) (#14266)
This commit is contained in:
parent
f6ecd931dc
commit
a29d3cf074
4 changed files with 55 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue