MacOS: Fix default sneak key. Improve mouse response (#7885)
authortexmex <josefsahlberg+minetest@gmail.com>
Sat, 24 Nov 2018 05:21:29 +0000 (06:21 +0100)
committerParamat <paramat@users.noreply.github.com>
Sat, 24 Nov 2018 05:21:29 +0000 (05:21 +0000)
src/defaultsettings.cpp

index 2408bffebcef030b67eb76048385e72140516306..de2e87840768bfa6193552d92f7ec121ddbc9ceb 100644 (file)
@@ -405,6 +405,12 @@ void set_default_settings(Settings *settings)
        settings->setDefault("high_precision_fpu", "true");
        settings->setDefault("enable_console", "false");
 
+       // Altered settings for macOS
+#ifdef __MACH__ && __APPLE__
+       settings->setDefault("keymap_sneak", "KEY_SHIFT");
+       settings->setDefault("fps_max", "0");
+#endif
+
        // Altered settings for Android
 #ifdef __ANDROID__
        settings->setDefault("screen_w", "0");