From d05b15df779940ef3907704ea07d5dd529b0b2b1 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 25 Aug 2013 18:25:01 +0400 Subject: [PATCH] Add a setting for HighPrecisionFPU (fixes #763). --- minetest.conf.example | 3 +++ src/defaultsettings.cpp | 1 + src/main.cpp | 2 ++ 3 files changed, 6 insertions(+) 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); -- 2.25.1