Commit Graph

22 Commits

Author SHA1 Message Date
Patrick Mackinlay
7957feaefc taptun: add support for Windows (#3790)
* 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
2018-07-30 18:52:11 +10:00
npwoods
3d553eda60 Attempted to sanitize/rationalize how we access UTF-8 command line arguments (#2532)
Specifically, this creates a call osd_get_command_line() that returns UTF-8 command line arguments as std::vector<std::string>.  On non-Windows platforms, this does nothing more than build the vector.  On Windows, this invokes GetCommandLineW() and CommandLineToArgvW().  This also attempts to unwind usage of wmain()/_tmain() on Windows, which is not standard.

Related to this, this fixes a bug in Imgtool; specifically, non-7 bit ASCII was not being handled correctly in Windows.

This is really an admission that the way that Windows handles Unicode and command line arguments sucks, and it is my belief that having a wmain() or _tmain() declaration specific for Windows is a worse solution.  C'est la vie.

I'm very open to the idea that src/osd/osdcore.[cpp|h] is not the best place to do this.  Let me know if I should move it.
2017-09-18 20:28:53 -04:00
Brad Hughes
b47ec24df6 Move special windows.h include directives to build defines (nw) 2016-12-28 15:07:28 -05:00
Miodrag Milanovic
7c765ea147 No need for osd_malloc, osd_malloc_array and osd_free (nw)
MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases
2016-11-11 16:12:01 +01:00
Miodrag Milanovic
5fc2774703 Clang 3.8.0 supports -municode (nw) 2016-03-14 07:55:17 +01:00
Miodrag Milanovic
40e0a1bcb7 Remove SDL 1.2 support (nw) 2016-02-16 16:35:03 +01:00
Brad Hughes
2f36228306 XAudio2 support 2016-01-20 23:16:18 -05:00
Miodrag Milanovic
ca37d40f69 Removed comments and added generic license for whole team on top (nw) 2015-05-09 16:05:30 +02:00
Miodrag Milanovic
abf7d057d2 Supported mingw-clang builds (nw) 2015-04-06 11:58:24 +02:00
Vas Crabb
4cd434246d Bring back USE_SDL, CYGWIN_BUILD and malloc debugging for Windows OSD 2015-04-04 14:53:47 +11:00
Miodrag Milanovic
627b7c61dc Ok shuffling done 2015-04-01 12:02:13 +02:00
Miodrag Milanovic
9207811ed5 fix it properly (nw) 2015-04-01 11:06:53 +02:00
Miodrag Milanovic
42ffb726fa uf reverting breaks mingw (nw) 2015-04-01 10:57:03 +02:00
Miodrag Milanovic
d504fa25ff moved unicode specific build defines in genie.lua to fix tools build (nw) 2015-04-01 10:53:26 +02:00
Vas Crabb
5ca7080703 Link osdnet into a library reflecting its location, define USE_NETWORK properly, don't use SDL in non-SDL-specific macros 2015-04-01 18:00:35 +11:00
Vas Crabb
4d84885a29 Refactor out common OSD modules into separate lua file 2015-04-01 07:29:54 +11:00
Vas Crabb
b64e4ecee5 Restore DONT_USE_NETWORK 2015-04-01 03:44:38 +11:00
Miodrag Milanovic
49545f9e84 Remove need for winprefix.h and moved alloca define to osdcomm.h (nw) 2015-03-31 11:09:10 +02:00
couriersud
a67f2cb095 Fix compile. (nw) 2015-03-29 22:50:55 +02:00
Miodrag Milanovic
93025d33c1 Added network flags (nw) 2015-03-29 10:57:10 +02:00
Vas Crabb
c878883667 Remove all the stuff that causes driver and emu sources to be compiled
differently with different OSDs
Switch back to building for all OSDs in common directory
Move more OSD-specific stuff into OSD scripts
It still isn't completely safe to be building all OSD into same directory
Common OSD "module" files, e.g. debuggers and renderers, build with
different options for each OSD.  It works at the moment, but you will end
up with slightly different executables depending on the order you build
OSDs.
2015-03-29 15:02:23 +11:00
Miodrag Milanovic
e14a06de87 Split OSD per file [qmc2] 2015-03-27 13:01:03 +01:00