Skip to content

Commit

Permalink
Prevent enabling Shaders if Direct3D is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Nov 23, 2013
1 parent 6f851c9 commit 1b3f35e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builtin/mainmenu.lua
Expand Up @@ -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", "0")
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"])
Expand Down

0 comments on commit 1b3f35e

Please sign in to comment.