aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2013-08-25 18:25:01 +0400
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2013-08-25 18:25:01 +0400
commitd05b15df779940ef3907704ea07d5dd529b0b2b1 (patch)
tree63948527d9614c728a99ae81cc1e8b20c1c47b27
parent151617c552dacba9805f2f385fd1aea28ac0872c (diff)
downloadminetest-d05b15df779940ef3907704ea07d5dd529b0b2b1.tar.gz
minetest-d05b15df779940ef3907704ea07d5dd529b0b2b1.tar.bz2
minetest-d05b15df779940ef3907704ea07d5dd529b0b2b1.zip
Add a setting for HighPrecisionFPU (fixes #763).
-rw-r--r--minetest.conf.example3
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/main.cpp2
3 files changed, 6 insertions, 0 deletions
diff --git a/minetest.conf.example b/minetest.conf.example
index 96f075e76..aeeff8223 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -389,3 +389,6 @@
#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
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index ab8e983e9..9e27c79cd 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -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)
diff --git a/src/main.cpp b/src/main.cpp
index 41acfe7b2..940580b7a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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);