From 7215993b74878cfd57aa7251fde74d18b233ba14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 8 Jun 2017 23:42:32 +0200
Subject: [PATCH] dxgmms1.sys: Add stub driver.

---
 configure.ac                      |  1 +
 dlls/dxgmms1.sys/Makefile.in      |  6 +++++
 dlls/dxgmms1.sys/dxgmms1.sys.spec |  2 ++
 dlls/dxgmms1.sys/main.c           | 39 +++++++++++++++++++++++++++++++
 loader/wine.inf.in                |  2 ++
 5 files changed, 50 insertions(+)
 create mode 100644 dlls/dxgmms1.sys/Makefile.in
 create mode 100644 dlls/dxgmms1.sys/dxgmms1.sys.spec
 create mode 100644 dlls/dxgmms1.sys/main.c

diff --git a/configure.ac b/configure.ac
index fbc6acda7..f8eed3baa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3269,6 +3269,7 @@ WINE_CONFIG_MAKEFILE(dlls/dxerr9)
 WINE_CONFIG_MAKEFILE(dlls/dxgi)
 WINE_CONFIG_MAKEFILE(dlls/dxgi/tests)
 WINE_CONFIG_MAKEFILE(dlls/dxgkrnl.sys)
+WINE_CONFIG_MAKEFILE(dlls/dxgmms1.sys)
 WINE_CONFIG_MAKEFILE(dlls/dxguid)
 WINE_CONFIG_MAKEFILE(dlls/dxva2)
 WINE_CONFIG_MAKEFILE(dlls/dxva2/tests)
diff --git a/dlls/dxgmms1.sys/Makefile.in b/dlls/dxgmms1.sys/Makefile.in
new file mode 100644
index 000000000..affb9ce95
--- /dev/null
+++ b/dlls/dxgmms1.sys/Makefile.in
@@ -0,0 +1,6 @@
+MODULE    = dxgmms1.sys
+IMPORTS   = ntoskrnl
+EXTRADLLFLAGS = -Wb,--subsystem,native
+
+C_SRCS = \
+	main.c
diff --git a/dlls/dxgmms1.sys/dxgmms1.sys.spec b/dlls/dxgmms1.sys/dxgmms1.sys.spec
new file mode 100644
index 000000000..124b0bf94
--- /dev/null
+++ b/dlls/dxgmms1.sys/dxgmms1.sys.spec
@@ -0,0 +1,2 @@
+@ stub VidMmInterface
+@ stub VidSchInterface
diff --git a/dlls/dxgmms1.sys/main.c b/dlls/dxgmms1.sys/main.c
new file mode 100644
index 000000000..686493d32
--- /dev/null
+++ b/dlls/dxgmms1.sys/main.c
@@ -0,0 +1,39 @@
+/*
+ * dxgmms1.sys driver
+ *
+ * Copyright 2017 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#define NONAMELESSUNION
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+#include "ddk/wdm.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxgmms1);
+
+NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
+{
+    TRACE( "(%p, %s)\n", driver, debugstr_w(path->Buffer) );
+    return STATUS_SUCCESS;
+}
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 279271f54..29afb4182 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -2554,6 +2554,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
 11,,iexplore.exe
 11,,winetest.exe,-
 12,,dxgkrnl.sys,-
+12,,dxgmms1.sys,-
 12,,fltmgr.sys,-
 12,,ksecdd.sys,-
 12,,mountmgr.sys,-
@@ -2604,6 +2605,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
 11,,notepad.exe
 11,,winetest.exe,-
 12,,dxgkrnl.sys
+12,,dxgmms1.sys
 12,,fltmgr.sys
 12,,ksecdd.sys
 12,,mountmgr.sys
-- 
2.21.0

