mirror of
https://github.com/holub/mame
synced 2025-04-30 11:50:30 +03:00

* taptun: add support for Windows Looking for feedback only at this point, because it's the first time I've attempted any OSD stuff - be gentle. This extends the existing taptun OSD module to support Windows through the TAP-Windows6 driver (https://github.com/OpenVPN/tap-windows6). * TAP-Windows6 is GPLv2, however only the header file is required in MAME, and the driver itself is entirely optional. * I've tried to minimise the size of the diff, rather than completely separate the Windows/non-Windows implementations - not sure which is preferable in this case. * The license file has Mac(?) line-endings - unsure if they should be normalized or used verbatim. * Uncertain about the non-Windows case (or the Windows SDL case) - existing code uses __linux__, but I'm not clear on how that works with OSX, for example? * I can't claim this actually "works" yet, because I don't know enough to configure the tap end of it properly to get networking doing something useful, but I will get there and correct anything necessary in a subsequent real PR. * minor fixes/improvements (nw) * Use Unicode Windows APIs, and UTF-8 for MAME * Deal with unterminated registry string values * Cancel any pending I/O in destructor
60 lines
824 B
Lua
60 lines
824 B
Lua
-- license:BSD-3-Clause
|
|
-- copyright-holders:MAMEdev Team
|
|
|
|
defines {
|
|
"OSD_WINDOWS",
|
|
"WIN32_LEAN_AND_MEAN",
|
|
"NOMINMAX",
|
|
}
|
|
|
|
configuration { "mingw* or vs*" }
|
|
defines {
|
|
"UNICODE",
|
|
"_UNICODE"
|
|
}
|
|
|
|
configuration { "vs*" }
|
|
flags {
|
|
"Unicode",
|
|
}
|
|
|
|
configuration { }
|
|
|
|
if not _OPTIONS["MODERN_WIN_API"] then
|
|
_OPTIONS["MODERN_WIN_API"] = "0"
|
|
end
|
|
|
|
if _OPTIONS["MODERN_WIN_API"]=="1" then
|
|
defines {
|
|
"WINVER=0x0602",
|
|
"_WIN32_WINNT=0x0602",
|
|
"NTDDI_VERSION=0x06030000",
|
|
"MODERN_WIN_API",
|
|
}
|
|
else
|
|
defines {
|
|
"_WIN32_WINNT=0x0501",
|
|
}
|
|
end
|
|
|
|
if not _OPTIONS["DONT_USE_NETWORK"] then
|
|
defines {
|
|
"USE_NETWORK",
|
|
"OSD_NET_USE_PCAP",
|
|
"OSD_NET_USE_TAPTUN",
|
|
}
|
|
end
|
|
|
|
if _OPTIONS["USE_SDL"]=="1" then
|
|
defines {
|
|
"SDLMAME_SDL2=1",
|
|
"USE_XINPUT=0",
|
|
"USE_SDL=1",
|
|
"USE_SDL_SOUND",
|
|
}
|
|
else
|
|
defines {
|
|
"USE_SDL=0",
|
|
}
|
|
end
|