summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-02-16 16:35:03 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-02-16 16:35:03 +0100
commit40e0a1bcb7bc87d1944b6eecde7c7ccfde2b4efe (patch)
tree923bc6c9170abc81d9231f7ea1ad8a19335c093f /scripts/src
parent22e6c350edc9d947fe1f51e7b9cd362505bf0432 (diff)
Remove SDL 1.2 support (nw)
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/osd/sdl.lua100
-rw-r--r--scripts/src/osd/sdl_cfg.lua16
-rw-r--r--scripts/src/osd/windows_cfg.lua2
3 files changed, 24 insertions, 94 deletions
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index ae4a752860c..3d1a3663614 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -39,15 +39,9 @@ function maintargetosdoptions(_target,_subtarget)
end
if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- links {
- "SDL2_ttf",
- }
- else
- links {
- "SDL_ttf",
- }
- end
+ links {
+ "SDL2_ttf",
+ }
local str = backtick("pkg-config --libs fontconfig")
addlibfromstring(str)
addoptionsfromstring(str)
@@ -55,15 +49,9 @@ function maintargetosdoptions(_target,_subtarget)
if _OPTIONS["targetos"]=="windows" then
if _OPTIONS["USE_LIBSDL"]~="1" then
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- links {
- "SDL2.dll",
- }
- else
- links {
- "SDL.dll",
- }
- end
+ links {
+ "SDL2.dll",
+ }
else
local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
addlibfromstring(str)
@@ -111,9 +99,9 @@ end
function sdlconfigcmd()
if not _OPTIONS["SDL_INSTALL_ROOT"] then
- return _OPTIONS['TOOLCHAIN'] .. "pkg-config " .. _OPTIONS["SDL_LIBVER"]
+ return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
else
- return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
end
end
@@ -159,23 +147,6 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
newoption {
- trigger = "SDL_LIBVER",
- description = "Choose SDL version",
- allowed = {
- { "sdl", "SDL" },
- { "sdl2", "SDL 2" },
- },
-}
-
-if not _OPTIONS["SDL_LIBVER"] then
- if _OPTIONS["targetos"]=="os2" then
- _OPTIONS["SDL_LIBVER"] = "sdl"
- else
- _OPTIONS["SDL_LIBVER"] = "sdl2"
- end
-end
-
-newoption {
trigger = "SDL2_MULTIAPI",
description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)",
allowed = {
@@ -246,10 +217,6 @@ elseif _OPTIONS["targetos"]=="os2" then
SYNC_IMPLEMENTATION = "os2"
end
-if _OPTIONS["SDL_LIBVER"]=="sdl" then
- USE_BGFX = 0
-end
-
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -270,15 +237,9 @@ if BASE_TARGETOS=="unix" then
linkoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- links {
- "SDL2.framework",
- }
- else
- links {
- "SDL.framework",
- }
- end
+ links {
+ "SDL2.framework",
+ }
else
local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
addlibfromstring(str)
@@ -293,11 +254,6 @@ if BASE_TARGETOS=="unix" then
"/usr/X11R6/lib",
"/usr/openwin/lib",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl" then
- links {
- "X11",
- }
- end
end
local str = backtick(sdlconfigcmd() .. " --libs")
addlibfromstring(str)
@@ -414,13 +370,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl" then
- -- SDLMain_tmpl isn't necessary for SDL2
- files {
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
- }
- end
end
files {
@@ -441,12 +390,10 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/watchdog.h",
MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
}
- if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- files {
- MAME_DIR .. "src/osd/modules/render/draw13.cpp",
- MAME_DIR .. "src/osd/modules/render/blit13.h",
- }
- end
+ files {
+ MAME_DIR .. "src/osd/modules/render/draw13.cpp",
+ MAME_DIR .. "src/osd/modules/render/blit13.h",
+ }
project ("ocore_" .. _OPTIONS["osd"])
@@ -540,15 +487,9 @@ if _OPTIONS["with-tools"] then
if _OPTIONS["targetos"] == "windows" then
if _OPTIONS["USE_LIBSDL"]~="1" then
- if _OPTIONS["SDL_LIBVER"] == "sdl2" then
- links {
- "SDL2.dll",
- }
- else
- links {
- "SDL.dll",
- }
- end
+ links {
+ "SDL2.dll",
+ }
else
local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
addlibfromstring(str)
@@ -563,11 +504,6 @@ if _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/main.cpp",
}
- elseif _OPTIONS["targetos"] == "macosx" and _OPTIONS["SDL_LIBVER"] == "sdl" then
- -- SDLMain_tmpl isn't necessary for SDL2
- files {
- MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
- }
end
configuration { "mingw*" or "vs*" }
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 431443ac059..bdeb7274ef1 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -56,18 +56,12 @@ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
}
end
-if _OPTIONS["SDL_LIBVER"]=="sdl2" then
- defines {
- "SDLMAME_SDL2=1",
- }
- if _OPTIONS["SDL2_MULTIAPI"]=="1" then
- defines {
- "SDL2_MULTIAPI",
- }
- end
-else
+defines {
+ "SDLMAME_SDL2=1",
+}
+if _OPTIONS["SDL2_MULTIAPI"]=="1" then
defines {
- "SDLMAME_SDL2=0",
+ "SDL2_MULTIAPI",
}
end
diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua
index 19ef05c3ce9..3e656017816 100644
--- a/scripts/src/osd/windows_cfg.lua
+++ b/scripts/src/osd/windows_cfg.lua
@@ -50,7 +50,7 @@ end
if _OPTIONS["USE_SDL"]=="1" then
defines {
- "SDLMAME_SDL2=0",
+ "SDLMAME_SDL2=1",
"USE_XINPUT=0",
"USE_SDL=1",
"USE_SDL_SOUND",