From 6cd8271575238fef0f1d8c57d936b3e470a6916a Mon Sep 17 00:00:00 2001 From: Cesare Falco Date: Sat, 6 Jun 2015 16:32:04 +0200 Subject: [PATCH] Added new SDL_INI_PATH flag --- makefile | 5 +++++ scripts/src/osd/sdl.lua | 5 +++++ scripts/src/osd/sdl_cfg.lua | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/makefile b/makefile index e96640a0d05..ef9b07f7381 100644 --- a/makefile +++ b/makefile @@ -27,6 +27,7 @@ # USE_DISPATCH_GL = 0 # DIRECTINPUT = 7 # USE_SDL = 1 +# SDL_INI_PATH = .;$HOME/.mame/;ini; # SDL2_MULTIAPI = 1 # NO_USE_MIDI = 1 # DONT_USE_NETWORK = 1 @@ -474,6 +475,10 @@ ifdef USE_SDL PARAMS += --USE_SDL='$(USE_SDL)' endif +ifdef SDL_INI_PATH +PARAMS += --SDL_INI_PATH='$(SDL_INI_PATH)' +endif + ifdef CYGWIN_BUILD PARAMS += --CYGWIN_BUILD='$(CYGWIN_BUILD)' endif diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 0fc7d57d3b9..0358881562f 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -101,6 +101,11 @@ newoption { description = "link against specific GL-Library - also adds rpath to executable (overridden by USE_DISPATCH_GL)", } +newoption { + trigger = "SDL_INI_PATH", + description = "Default search path for .ini files", +} + newoption { trigger = "NO_X11", description = "Disable use of X11", diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua index a26d80f197b..a204201d6f5 100644 --- a/scripts/src/osd/sdl_cfg.lua +++ b/scripts/src/osd/sdl_cfg.lua @@ -18,6 +18,11 @@ if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS[ } end +if _OPTIONS["SDL_INI_PATH"]~=nil then + defines { + "'INI_PATH=\"" .. _OPTIONS["SDL_INI_PATH"] .. "\"'", + } +end if _OPTIONS["NO_X11"]=="1" then defines {