mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
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:
@ -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);
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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>
|
@ -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
|
||||
{
|
||||
|
@ -10,11 +10,8 @@
|
||||
#include "InputCommon/ControllerInterface/Device.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#include <dinput.h>
|
||||
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
|
||||
#elif __APPLE__
|
||||
#include "InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h"
|
||||
#endif
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <XInput.h>
|
||||
|
||||
|
Reference in New Issue
Block a user