diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/osd/windows.lua | 47 | ||||
-rw-r--r-- | scripts/src/osd/windows_cfg.lua | 19 |
2 files changed, 63 insertions, 3 deletions
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index fcedd0c6710..3b060f64b55 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -21,6 +21,13 @@ function maintargetosdoptions(_target) } end + + if _OPTIONS["USE_SDL"] == "1" then + links { + "SDL.dll", + } + end + local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc" if os.isfile(rcfile) then @@ -40,7 +47,7 @@ newoption { description = "Minimum DirectInput version to support", allowed = { { "7", "Support DirectInput 7 or later" }, - { "8", "Support DirectInput 8 or later" }, + { "8", "Support DirectInput 8 or later" }, }, } @@ -48,6 +55,42 @@ if not _OPTIONS["DIRECTINPUT"] then _OPTIONS["DIRECTINPUT"] = "8" end +newoption { + trigger = "USE_SDL", + description = "Enable SDL sound output", + allowed = { + { "0", "Disable SDL sound output" }, + { "1", "Enable SDL sound output" }, + }, +} + +if not _OPTIONS["USE_SDL"] then + _OPTIONS["USE_SDL"] = "0" +end + +newoption { + trigger = "CYGWIN_BUILD", + description = "Build with Cygwin tools", + allowed = { + { "0", "Build with MinGW tools" }, + { "1", "Build with Cygwin tools" }, + }, +} + +if not _OPTIONS["CYGWIN_BUILD"] then + _OPTIONS["CYGWIN_BUILD"] = "0" +end + + +if _OPTIONS["CYGWIN_BUILD"] == "1" then + buildoptions { + "-mmo-cygwin", + } + linkoptions { + "-mno-cygwin", + } +end + project ("osd_" .. _OPTIONS["osd"]) uuid (os.uuid("osd_" .. _OPTIONS["osd"])) @@ -157,7 +200,7 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c", } - if _OPTIONS["NOASM"]=="1" then + if _OPTIONS["NOASM"] == "1" then files { MAME_DIR .. "src/osd/modules/sync/work_mini.c", } diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua index 8bbba52f8d6..082cdc432eb 100644 --- a/scripts/src/osd/windows_cfg.lua +++ b/scripts/src/osd/windows_cfg.lua @@ -2,11 +2,15 @@ defines { "UNICODE", "_UNICODE", "OSD_WINDOWS", - "USE_SDL=0", "main=utf8_main", "_WIN32_WINNT=0x0501", } +configuration { "Debug" } + defines { + "MALLOC_DEBUG", + } + configuration { "vs*" } flags { "Unicode", @@ -20,3 +24,16 @@ if not _OPTIONS["DONT_USE_NETWORK"] then "OSD_NET_USE_PCAP", } end + +if _OPTIONS["USE_SDL"]=="1" then + defines { + "SDLMAME_SDL2=0", + "USE_XINPUT=0", + "USE_SDL=1", + "USE_SDL_SOUND", + } +else + defines { + "USE_SDL=0", + } +end |