aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmallJoker <st.rentsch@hotmail.com>2014-09-04 20:34:36 +0200
committerBlockMen <nmuelll@web.de>2014-09-21 16:27:58 +0200
commit44a1d0c192d19b40beda337fb22f2c79ccb2adfd (patch)
tree8e4dac6f985d6779a1711bf32403b1c38fad4c0b
parent406ed5efac68af31c3cc7a0e7401ebf4dd419804 (diff)
downloadminetest-44a1d0c192d19b40beda337fb22f2c79ccb2adfd.tar.gz
minetest-44a1d0c192d19b40beda337fb22f2c79ccb2adfd.tar.bz2
minetest-44a1d0c192d19b40beda337fb22f2c79ccb2adfd.zip
Fix wrong video_driver setting when changing in mainmenu
Fixes issue with direct3d(8|9)
-rw-r--r--builtin/mainmenu/tab_settings.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua
index 4bb3eb36c..d97dd0051 100644
--- a/builtin/mainmenu/tab_settings.lua
+++ b/builtin/mainmenu/tab_settings.lua
@@ -122,7 +122,8 @@ local function formspec(tabview, name, tabdata)
end
video_driver_string = video_driver_string .. video_drivers[i]
- if current_video_driver:lower() == video_drivers[i]:lower() then
+ local video_driver = string.gsub(video_drivers[i], " ", "")
+ if current_video_driver:lower() == video_driver:lower() then
current_video_driver_idx = i
end
end
@@ -317,7 +318,8 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
ddhandled = true
end
if fields["dd_video_driver"] then
- core.setting_set("video_driver",fields["dd_video_driver"])
+ local video_driver = string.gsub(fields["dd_video_driver"], " ", "")
+ core.setting_set("video_driver",string.lower(video_driver))
ddhandled = true
end