Author: akhaldi
Date: Mon Jan 20 11:25:53 2014
New Revision: 61718
URL:
http://svn.reactos.org/svn/reactos?rev=61718&view=rev
Log:
[DINPUT]
* Move some inclusions to the main header.
* Set the default debugging channel globally through the main header.
* Remove inclusions and definitions that already exist in the main header.
* Improve header inclusions.
CORE-7716
Modified:
trunk/reactos/dll/directx/wine/dinput/config.c
trunk/reactos/dll/directx/wine/dinput/device.c
trunk/reactos/dll/directx/wine/dinput/device_private.h
trunk/reactos/dll/directx/wine/dinput/dinput.rc
trunk/reactos/dll/directx/wine/dinput/dinput_main.c
trunk/reactos/dll/directx/wine/dinput/dinput_private.h
trunk/reactos/dll/directx/wine/dinput/joystick.c
trunk/reactos/dll/directx/wine/dinput/joystick_linux.c
trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c
trunk/reactos/dll/directx/wine/dinput/joystick_private.h
trunk/reactos/dll/directx/wine/dinput/keyboard.c
trunk/reactos/dll/directx/wine/dinput/mouse.c
trunk/reactos/dll/directx/wine/dinput/resource.h
Modified: trunk/reactos/dll/directx/wine/dinput/config.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/co…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/config.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/config.c [iso-8859-1] Mon Jan 20 11:25:53 2014
@@ -16,12 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define NONAMELESSUNION
-
-//#include "wine/unicode.h"
-//#include "objbase.h"
#include "dinput_private.h"
-//#include "device_private.h"
+
+#include <winuser.h>
+#include <commctrl.h>
#include "resource.h"
Modified: trunk/reactos/dll/directx/wine/dinput/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/de…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] Mon Jan 20 11:25:53 2014
@@ -24,22 +24,8 @@
It also contains all the helper functions.
*/
-#include <config.h>
-
-//#include <stdarg.h>
-//#include <string.h>
-#include <wine/debug.h>
-#include <wine/unicode.h>
-//#include "windef.h"
-//#include "winbase.h"
-#include <winreg.h>
-#include <winuser.h>
-//#include "winerror.h"
-//#include "dinput.h"
-#include "device_private.h"
-//#include "dinput_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
+
+#include "dinput_private.h"
static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A
*iface)
{
Modified: trunk/reactos/dll/directx/wine/dinput/device_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/de…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/device_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/device_private.h [iso-8859-1] Mon Jan 20
11:25:53 2014
@@ -19,14 +19,6 @@
#ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
#define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
-
-//#include <stdarg.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "dinput.h"
-//#include "wine/list.h"
-#include "dinput_private.h"
typedef struct
{
Modified: trunk/reactos/dll/directx/wine/dinput/dinput.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/dinput.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/dinput.rc [iso-8859-1] Mon Jan 20 11:25:53 2014
@@ -15,6 +15,9 @@
* 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 <winuser.h>
+#include <commctrl.h>
#include "resource.h"
Modified: trunk/reactos/dll/directx/wine/dinput/dinput_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] Mon Jan 20 11:25:53
2014
@@ -30,33 +30,9 @@
* - Fallout : works great in X and DGA mode
*/
-#include <config.h>
-//#include <assert.h>
-//#include <stdarg.h>
-//#include <string.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-
-#include <wine/debug.h>
-//#include "wine/unicode.h"
-//#include "windef.h"
-#include <winbase.h>
-#include <winuser.h>
-#include <winnls.h>
-//#include "winerror.h"
-#include <objbase.h>
+#include "dinput_private.h"
+
#include <rpcproxy.h>
-//#include "initguid.h"
-//#include "dinput_private.h"
-#include "device_private.h"
-//#include "dinputd.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static const IDirectInput7AVtbl ddi7avt;
static const IDirectInput7WVtbl ddi7wvt;
Modified: trunk/reactos/dll/directx/wine/dinput/dinput_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/dinput_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/dinput_private.h [iso-8859-1] Mon Jan 20
11:25:53 2014
@@ -19,17 +19,29 @@
#ifndef __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
#define __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
+#include <wine/config.h>
+
+#include <stdarg.h>
+
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
-#include <stdarg.h>
+#define COBJMACROS
+#define NONAMELESSUNION
#include <windef.h>
#include <winbase.h>
+#include <winreg.h>
+#include <winuser.h>
#include <dinput.h>
#include <dinputd.h>
+
+#include <wine/debug.h>
#include <wine/list.h>
+#include <wine/unicode.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(dinput);
/* Implementation specification */
typedef struct IDirectInputImpl IDirectInputImpl;
@@ -82,4 +94,6 @@
#define DIMOUSE_MASK 0x82000000
#define DIGENRE_ANY 0xFF000000
+#include "device_private.h"
+
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
Modified: trunk/reactos/dll/directx/wine/dinput/joystick.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] Mon Jan 20 11:25:53
2014
@@ -26,11 +26,9 @@
* force feedback
*/
+#include "dinput_private.h"
+
#include "joystick_private.h"
-#include <wine/debug.h>
-#include <winreg.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static inline JoystickGenericImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A
*iface)
{
Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linux.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] Mon Jan 20
11:25:53 2014
@@ -25,24 +25,17 @@
* force feedback
*/
-#include <config.h>
-//#include "wine/port.h"
-
-//#include <stdarg.h>
-//#include <stdio.h>
-//#include <string.h>
-//#include <time.h>
+#include "dinput_private.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
-//#include <fcntl.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
-//#include <errno.h>
#ifdef HAVE_LINUX_IOCTL_H
# include <linux/ioctl.h>
#endif
@@ -53,19 +46,6 @@
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
-
-#include <wine/debug.h>
-//#include "wine/unicode.h"
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winerror.h"
-//#include "dinput.h"
-
-//#include "dinput_private.h"
-#include "device_private.h"
-//#include "joystick_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
#ifdef HAVE_LINUX_22_JOYSTICK_API
Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] Mon Jan 20
11:25:53 2014
@@ -20,14 +20,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <config.h>
-//#include "wine/port.h"
-
-//#include <assert.h>
-//#include <stdarg.h>
-//#include <stdio.h>
-//#include <string.h>
-//#include <time.h>
+#include "dinput_private.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -50,20 +44,7 @@
# include <sys/poll.h>
#endif
-#include <wine/debug.h>
-//#include "wine/unicode.h"
-//#include "wine/list.h"
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winerror.h"
-//#include "winreg.h"
-//#include "dinput.h"
-
-//#include "dinput_private.h"
#include "device_private.h"
-//#include "joystick_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
#ifdef HAS_PROPER_HEADER
Modified: trunk/reactos/dll/directx/wine/dinput/joystick_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick_private.h [iso-8859-1] Mon Jan 20
11:25:53 2014
@@ -18,20 +18,6 @@
#ifndef __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
#define __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include "windef.h"
-#include "winbase.h"
-#include "dinput.h"
-#include "wine/list.h"
-#include "wine/unicode.h"
-#include "dinput_private.h"
-#include "device_private.h"
/* Number of objects in the default data format */
#define MAX_PROPS 164
Modified: trunk/reactos/dll/directx/wine/dinput/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/ke…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] Mon Jan 20 11:25:53
2014
@@ -20,24 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <config.h>
-//#include "wine/port.h"
-
-#include <stdarg.h>
-//#include <string.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-#include <winnls.h>
-//#include "winerror.h"
-//#include "dinput.h"
-
-//#include "dinput_private.h"
-#include "device_private.h"
-#include <wine/debug.h>
-//#include "wine/unicode.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
+#include "dinput_private.h"
#define WINE_DINPUT_KEYBOARD_MAX_KEYS 256
Modified: trunk/reactos/dll/directx/wine/dinput/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/mo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/mouse.c [iso-8859-1] Mon Jan 20 11:25:53 2014
@@ -19,26 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <config.h>
-//#include "wine/port.h"
-
-#include <stdarg.h>
-//#include <string.h>
-
-#include <windef.h>
-//#include "winbase.h"
-//#include "wingdi.h"
-#include <winuser.h>
-//#include "winerror.h"
-#include <winreg.h>
-//#include "dinput.h"
-
-//#include "dinput_private.h"
-#include "device_private.h"
-#include <wine/debug.h>
-#include <wine/unicode.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
+#include "dinput_private.h"
/* Wine mouse driver object instances */
#define WINE_MOUSE_X_AXIS_INSTANCE 0
Modified: trunk/reactos/dll/directx/wine/dinput/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/re…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/resource.h [iso-8859-1] Mon Jan 20 11:25:53
2014
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include "shlobj.h"
-
-#include <windef.h>
-#include <winuser.h>
-#include <commctrl.h>
+#pragma once
#define IDD_CONFIGUREDEVICES 1