From: Sfan5 Date: Sat, 23 Nov 2013 07:55:48 +0000 (+0100) Subject: Prevent enabling Shaders if Direct3D is used X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ee0b8da844451509ff9afc07912f6b31cf12f40b;p=zefram%2Fminetest%2Fminetest_engine.git Prevent enabling Shaders if Direct3D is used --- diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua index 7ef5129c..a8adca54 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"])