Merge pull request #857 from shuffle2/msvc-improvements

windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines
This commit is contained in:
shuffle2 2014-08-23 11:02:48 -07:00
commit f964a282e1
12 changed files with 24 additions and 33 deletions

View File

@ -4,9 +4,6 @@
#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 <cstdlib>
#include <cstring>
@ -89,13 +86,6 @@ private:
#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
#define CHECK_HEAP_INTEGRITY()

View File

@ -9,7 +9,7 @@
#include <unordered_map>
#include <unordered_set>
#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 <dbt.h> //NOLINT
#include <setupapi.h> //NOLINT

View File

@ -4,9 +4,6 @@
#pragma once
// windows crap
#define NOMINMAX
#include <algorithm>
#include <cmath>
#include <memory>

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
{

View File

@ -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

View File

@ -5,7 +5,6 @@
#pragma once
#define NOMINMAX
#include <windows.h>
#include <XInput.h>

View File

@ -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">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
@ -51,6 +51,7 @@
<ClInclude Include="ControllerInterface\ControllerInterface.h" />
<ClInclude Include="ControllerInterface\Device.h" />
<ClInclude Include="ControllerInterface\DInput\DInput.h" />
<ClInclude Include="ControllerInterface\DInput\DInput8.h" />
<ClInclude Include="ControllerInterface\DInput\DInputJoystick.h" />
<ClInclude Include="ControllerInterface\DInput\DInputKeyboardMouse.h" />
<ClInclude Include="ControllerInterface\ExpressionParser.h" />
@ -70,4 +71,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -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">
<ItemGroup>
<Filter Include="ControllerInterface">
@ -70,8 +70,11 @@
<ClInclude Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.h">
<Filter>ControllerInterface\ForceFeedback</Filter>
</ClInclude>
<ClInclude Include="ControllerInterface\DInput\DInput8.h">
<Filter>ControllerInterface\DInput</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -5,7 +5,6 @@
#pragma once
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif