Reverted module selection feature. This is not really desired.

Users (or lovers) do not get to choose which implementation of
a module they would like to use.

The abstraction is for dealing with portability issues, not
for giving people the ability to choose an alternative
(inferior) backend. The best choice for any platform/situation
should at all times be the *default* for that platform/situation.
If this is not the case; it's a bug (that is easily fixed).

Any module should provide the functionality promised in the docs.
The lover (or user) should not care how, and if [s]he does, [s]he
does still not get to choose.

Also, a related note: duplication of wrapper code is something I
especially wanted to avoid when I first (or should I say ...
"eventually") formed the current architecture.

--HG--
branch : minor
This commit is contained in:
rude
2011-03-26 17:06:05 +01:00
parent 2a42c64a35
commit 3fe9b2ff16
37 changed files with 2055 additions and 2454 deletions
+2 -21
View File
@@ -187,7 +187,7 @@ function love.boot()
-- This is absolutely needed.
require("love")
require("love.filesystem.physfs")
require("love.filesystem")
love.arg.parse_options()
@@ -275,29 +275,10 @@ function love.init()
c.console = true
end
local defaultmodules = {
audio = "openal",
event = "sdl",
filesystem = "physfs",
font = "freetype",
graphics = "opengl",
image = "devil",
joystick = "sdl",
keyboard = "sdl",
mouse = "sdl",
physics = "box2d",
sound = "lullaby",
timer = "sdl",
thread = "sdl"
}
-- Gets desired modules.
for k,v in pairs(c.modules) do
if v then
if type(v) ~= "string" then
v = defaultmodules[k]
end
require((v and "love.%s.%s" or "love.%s"):format(k, v))
require("love." .. k)
end
end