aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSfan5 <sfan5@live.de>2013-11-23 08:55:48 +0100
committerSfan5 <sfan5@live.de>2013-11-23 15:41:47 +0100
commitee0b8da844451509ff9afc07912f6b31cf12f40b (patch)
tree6ca64981ee976829aafa847803dd5f4752e61812
parent6f851c969251895efc3c3f02650456a2eac05d95 (diff)
downloadminetest-ee0b8da844451509ff9afc07912f6b31cf12f40b.tar.gz
minetest-ee0b8da844451509ff9afc07912f6b31cf12f40b.tar.bz2
minetest-ee0b8da844451509ff9afc07912f6b31cf12f40b.zip
Prevent enabling Shaders if Direct3D is used
-rw-r--r--builtin/mainmenu.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua
index 7ef5129c3..a8adca54f 100644
--- a/builtin/mainmenu.lua
+++ b/builtin/mainmenu.lua
@@ -645,7 +645,12 @@ function tabbuilder.handle_settings_buttons(fields)
end
if fields["cb_shaders"] then
- engine.setting_set("enable_shaders", fields["cb_shaders"])
+ if (engine.setting_get("video_driver") == "direct3d8" or engine.setting_get("video_driver") == "direct3d9") then
+ engine.setting_set("enable_shaders", "false")
+ gamedata.errormessage = fgettext("To enable shaders the OpenGL driver needs to be used.")
+ else
+ engine.setting_set("enable_shaders", fields["cb_shaders"])
+ end
end
if fields["cb_pre_ivis"] then
engine.setting_set("preload_item_visuals", fields["cb_pre_ivis"])