Add a setting for HighPrecisionFPU (fixes #763).
authorIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 25 Aug 2013 14:25:01 +0000 (18:25 +0400)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 25 Aug 2013 14:25:01 +0000 (18:25 +0400)
minetest.conf.example
src/defaultsettings.cpp
src/main.cpp

index 96f075e76e4278ad5d03d4f3701983c5ad2cbb39..aeeff82232e77497d6c97a129081d0babb598f44 100644 (file)
 #modstore_download_url = https://forum.minetest.net/media/
 #modstore_listmods_url = https://forum.minetest.net/mmdb/mods/
 #modstore_details_url  = https://forum.minetest.net/mmdb/mod/*/
+
+# Makes DirectX work with LuaJIT. Disable if it causes troubles.
+#high_precision_fpu = true
index ab8e983e917d62617d4415245ac9f3d248eacb68..9e27c79cdd92716a635283773f5c1408469f20e6 100644 (file)
@@ -280,6 +280,7 @@ void set_default_settings(Settings *settings)
        settings->setDefault("modstore_listmods_url", "https://forum.minetest.net/mmdb/mods/");
        settings->setDefault("modstore_details_url", "https://forum.minetest.net/mmdb/mod/*/");
 
+       settings->setDefault("high_precision_fpu", "true");
 }
 
 void override_default_settings(Settings *settings, Settings *from)
index 41acfe7b276ea621939a7d47d5abe3dc91df3809..940580b7a067d563093232733b380bb7c858eec7 100644 (file)
@@ -1288,6 +1288,7 @@ int main(int argc, char *argv[])
                params.Stencilbuffer = false;
                params.Vsync         = vsync;
                params.EventReceiver = &receiver;
+               params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
 
                nulldevice = createDeviceEx(params);
 
@@ -1340,6 +1341,7 @@ int main(int argc, char *argv[])
        params.Stencilbuffer = false;
        params.Vsync         = vsync;
        params.EventReceiver = &receiver;
+       params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
 
        device = createDeviceEx(params);