summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/osd/windows.lua35
1 files changed, 34 insertions, 1 deletions
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 7f02118b054..03d3948dd4f 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -8,6 +8,16 @@ function maintargetosdoptions(_target)
"-municode",
}
+ if _OPTIONS["DIRECTINPUT"] == "8" then
+ links {
+ "dinput8",
+ }
+ else
+ links {
+ "dinput",
+ }
+ end
+
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
if os.isfile(rcfile) then
@@ -22,6 +32,20 @@ function maintargetosdoptions(_target)
end
+newoption {
+ trigger = "DIRECTINPUT",
+ description = "Minimum DirectInput version to support",
+ allowed = {
+ { "7", "Support DirectInput 7 or later" },
+ { "8", "Support DirectInput 8 or later" },
+ },
+}
+
+if not _OPTIONS["DIRECTINPUT"] then
+ _OPTIONS["DIRECTINPUT"] = "8"
+end
+
+
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
kind "StaticLib"
@@ -30,10 +54,19 @@ project ("osd_" .. _OPTIONS["osd"])
osdmodulesbuild()
defines {
- "DIRECTINPUT_VERSION=0x0800",
"DIRECT3D_VERSION=0x0900",
}
+ if _OPTIONS["DIRECTINPUT"] == "8" then
+ defines {
+ "DIRECTINPUT_VERSION=0x0800",
+ }
+ else
+ defines {
+ "DIRECTINPUT_VERSION=0x0700",
+ }
+ end
+
includedirs {
MAME_DIR .. "src/emu",
MAME_DIR .. "src/osd",