windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code.

Wrap dinput.h in a header defining DIRECTINPUT_VERSION instead of repeating it multiple places.
This commit is contained in:
Shawn Hoffman
2014-08-22 17:17:49 -07:00
parent 6a5188c9bc
commit 327d35377d
12 changed files with 24 additions and 33 deletions

View File

@ -48,8 +48,11 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device)
void Init(std::vector<Core::Device*>& devices, HWND hwnd)
{
IDirectInput8* idi8;
if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, nullptr)))
if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION,
IID_IDirectInput8, (LPVOID*)&idi8, nullptr)))
{
return;
}
InitKeyboardMouse(idi8, devices, hwnd);
InitJoystick(idi8, devices, hwnd);

View File

@ -6,14 +6,11 @@
#define DINPUT_SOURCE_NAME "DInput"
#define DIRECTINPUT_VERSION 0x0800
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <dinput.h>
#include <list>
#include <windows.h>
#include "InputCommon/ControllerInterface/Device.h"
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
namespace ciface
{

View File

@ -0,0 +1,8 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>

View File

@ -4,13 +4,10 @@
#pragma once
#define DIRECTINPUT_VERSION 0x0800
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <dinput.h>
#include <windows.h>
#include "InputCommon/ControllerInterface/Device.h"
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
namespace ciface
{