Merge pull request #857 from shuffle2/msvc-improvements
windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines
This commit is contained in:
commit
f964a282e1
|
@ -4,9 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// DO NOT EVER INCLUDE <windows.h> directly _or indirectly_ from this file
|
|
||||||
// since it slows down the build a lot.
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@ -89,13 +86,6 @@ private:
|
||||||
|
|
||||||
#elif defined _WIN32
|
#elif defined _WIN32
|
||||||
|
|
||||||
// Check MSC ver
|
|
||||||
#if !defined _MSC_VER || _MSC_VER <= 1000
|
|
||||||
#error needs at least version 1000 of MSC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NOMINMAX
|
|
||||||
|
|
||||||
// Memory leak checks
|
// Memory leak checks
|
||||||
#define CHECK_HEAP_INTEGRITY()
|
#define CHECK_HEAP_INTEGRITY()
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
// The following Windows headers MUST be included after windows.h.
|
// The following Windows headers must be included AFTER windows.h.
|
||||||
#include <BluetoothAPIs.h> //NOLINT
|
#include <BluetoothAPIs.h> //NOLINT
|
||||||
#include <dbt.h> //NOLINT
|
#include <dbt.h> //NOLINT
|
||||||
#include <setupapi.h> //NOLINT
|
#include <setupapi.h> //NOLINT
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// windows crap
|
|
||||||
#define NOMINMAX
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -48,8 +48,11 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device)
|
||||||
void Init(std::vector<Core::Device*>& devices, HWND hwnd)
|
void Init(std::vector<Core::Device*>& devices, HWND hwnd)
|
||||||
{
|
{
|
||||||
IDirectInput8* idi8;
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
InitKeyboardMouse(idi8, devices, hwnd);
|
InitKeyboardMouse(idi8, devices, hwnd);
|
||||||
InitJoystick(idi8, devices, hwnd);
|
InitJoystick(idi8, devices, hwnd);
|
||||||
|
|
|
@ -6,14 +6,11 @@
|
||||||
|
|
||||||
#define DINPUT_SOURCE_NAME "DInput"
|
#define DINPUT_SOURCE_NAME "DInput"
|
||||||
|
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#define NOMINMAX
|
|
||||||
#include <dinput.h>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "InputCommon/ControllerInterface/Device.h"
|
#include "InputCommon/ControllerInterface/Device.h"
|
||||||
|
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
|
||||||
|
|
||||||
namespace ciface
|
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
|
#pragma once
|
||||||
|
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#define NOMINMAX
|
|
||||||
#include <dinput.h>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "InputCommon/ControllerInterface/Device.h"
|
#include "InputCommon/ControllerInterface/Device.h"
|
||||||
|
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
|
||||||
|
|
||||||
namespace ciface
|
namespace ciface
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,11 +10,8 @@
|
||||||
#include "InputCommon/ControllerInterface/Device.h"
|
#include "InputCommon/ControllerInterface/Device.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#define NOMINMAX
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <dinput.h>
|
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
#include "InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h"
|
#include "InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define NOMINMAX
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <XInput.h>
|
#include <XInput.h>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
<ClInclude Include="ControllerInterface\ControllerInterface.h" />
|
<ClInclude Include="ControllerInterface\ControllerInterface.h" />
|
||||||
<ClInclude Include="ControllerInterface\Device.h" />
|
<ClInclude Include="ControllerInterface\Device.h" />
|
||||||
<ClInclude Include="ControllerInterface\DInput\DInput.h" />
|
<ClInclude Include="ControllerInterface\DInput\DInput.h" />
|
||||||
|
<ClInclude Include="ControllerInterface\DInput\DInput8.h" />
|
||||||
<ClInclude Include="ControllerInterface\DInput\DInputJoystick.h" />
|
<ClInclude Include="ControllerInterface\DInput\DInputJoystick.h" />
|
||||||
<ClInclude Include="ControllerInterface\DInput\DInputKeyboardMouse.h" />
|
<ClInclude Include="ControllerInterface\DInput\DInputKeyboardMouse.h" />
|
||||||
<ClInclude Include="ControllerInterface\ExpressionParser.h" />
|
<ClInclude Include="ControllerInterface\ExpressionParser.h" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="ControllerInterface">
|
<Filter Include="ControllerInterface">
|
||||||
|
@ -70,6 +70,9 @@
|
||||||
<ClInclude Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.h">
|
<ClInclude Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.h">
|
||||||
<Filter>ControllerInterface\ForceFeedback</Filter>
|
<Filter>ControllerInterface\ForceFeedback</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="ControllerInterface\DInput\DInput8.h">
|
||||||
|
<Filter>ControllerInterface\DInput</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue