summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/sdl.lua
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-04-01 00:41:59 +1100
committer Vas Crabb <vas@vastheman.com>2015-04-01 01:21:59 +1100
commitdbc99041c339c4a11931f4b7a6738ec8c88fbe2f (patch)
treedc36bf8b7ed082982e33b8f9a072aa22cc731fb1 /scripts/src/osd/sdl.lua
parent9a2c6d95c80b849e70fd3428d5e7c672fe2b607e (diff)
Restore NO_OPENGL and USE_DISPATCH_GL
Diffstat (limited to 'scripts/src/osd/sdl.lua')
-rw-r--r--scripts/src/osd/sdl.lua55
1 files changed, 51 insertions, 4 deletions
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 93de0e87dfd..d3a8dc0faa5 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -23,12 +23,22 @@ function maintargetosdoptions(_target)
"SDL_ttf",
}
end
+ if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" then
+ links {
+ "GL"
+ }
+ end
linkoptions {
string.gsub(os.outputof("pkg-config --libs fontconfig"), '[\r\n]+', ' '),
}
end
if _OPTIONS["targetos"]=="windows" then
+ if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" then
+ links {
+ "opengl32"
+ }
+ end
configuration { "mingw*" }
linkoptions{
"-municode",
@@ -44,7 +54,6 @@ function maintargetosdoptions(_target)
configuration { "vs*" }
links {
"SDL2",
- "opengl32",
}
configuration {}
@@ -104,6 +113,40 @@ end
newoption {
+ trigger = "NO_OPENGL",
+ description = "Disable use of OpenGL",
+ allowed = {
+ { "0", "Enable OpenGL" },
+ { "1", "Disable OpenGL" },
+ },
+}
+
+if not _OPTIONS["NO_OPENGL"] then
+ if _OPTIONS["targetos"]=="os2" then
+ _OPTIONS["NO_OPENGL"] = "1"
+ else
+ _OPTIONS["NO_OPENGL"] = "0"
+ end
+end
+
+newoption {
+ trigger = "USE_DISPATCH_GL",
+ description = "Use GL-dispatching",
+ allowed = {
+ { "0", "Link to OpenGL library" },
+ { "1", "Use GL-dispatching" },
+ },
+}
+
+if not _OPTIONS["USE_DISPATCH_GL"] then
+ if USE_BGFX == 1 then
+ _OPTIONS["USE_DISPATCH_GL"] = "0"
+ else
+ _OPTIONS["USE_DISPATCH_GL"] = "1"
+ end
+end
+
+newoption {
trigger = "NO_X11",
description = "Disable use of X11",
allowed = {
@@ -365,13 +408,10 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/watchdog.c",
MAME_DIR .. "src/osd/modules/lib/osdobj_common.c",
MAME_DIR .. "src/osd/modules/render/drawsdl.c",
- MAME_DIR .. "src/osd/modules/render/drawogl.c",
MAME_DIR .. "src/osd/modules/debugger/none.c",
MAME_DIR .. "src/osd/modules/debugger/debugint.c",
MAME_DIR .. "src/osd/modules/debugger/debugwin.c",
MAME_DIR .. "src/osd/modules/debugger/debugqt.c",
- MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.c",
- MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.c",
MAME_DIR .. "src/osd/modules/font/font_sdl.c",
MAME_DIR .. "src/osd/modules/font/font_windows.c",
MAME_DIR .. "src/osd/modules/font/font_osx.c",
@@ -386,6 +426,13 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/sound/sdl_sound.c",
MAME_DIR .. "src/osd/modules/sound/none.c",
}
+ if _OPTIONS["NO_OPENGL"]~="1" then
+ files {
+ MAME_DIR .. "src/osd/modules/render/drawogl.c",
+ MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.c",
+ MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.c",
+ }
+ end
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
files {
MAME_DIR .. "src/osd/modules/render/draw13.c",