diff options
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r-- | scripts/src/osd/modules.lua | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index c3d4d3a117d..8e55ae2d8d3 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -77,18 +77,27 @@ function osdmodulesbuild() } end - files { - MAME_DIR .. "src/osd/modules/render/drawogl.cpp", - MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp", - MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp", - MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h", - MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h", - MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h", - } - if _OPTIONS["USE_DISPATCH_GL"]=="1" then + if _OPTIONS["NO_OPENGL"]=="1" then + defines { + "USE_OPENGL=0", + } + else + files { + MAME_DIR .. "src/osd/modules/render/drawogl.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h", + MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h", + } defines { - "USE_DISPATCH_GL=1", + "USE_OPENGL=1", } + if _OPTIONS["USE_DISPATCH_GL"]=="1" then + defines { + "USE_DISPATCH_GL=1", + } + end end files { @@ -242,19 +251,21 @@ end function osdmodulestargetconf() - if _OPTIONS["targetos"]=="macosx" then - links { - "OpenGL.framework", - } - elseif _OPTIONS["USE_DISPATCH_GL"]~="1" then - if _OPTIONS["targetos"]=="windows" then - links { - "opengl32", - } - else + if _OPTIONS["NO_OPENGL"]~="1" then + if _OPTIONS["targetos"]=="macosx" then links { - "GL", + "OpenGL.framework", } + elseif _OPTIONS["USE_DISPATCH_GL"]~="1" then + if _OPTIONS["targetos"]=="windows" then + links { + "opengl32", + } + else + links { + "GL", + } + end end end @@ -332,6 +343,15 @@ newoption { } newoption { + trigger = "NO_OPENGL", + description = "Disable use of OpenGL", + allowed = { + { "0", "Enable OpenGL" }, + { "1", "Disable OpenGL" }, + }, +} + +newoption { trigger = "USE_DISPATCH_GL", description = "Use GL-dispatching", allowed = { |