| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/gamepad/platform_data_fetcher_win.h" | 5 #include "content/browser/gamepad/platform_data_fetcher_win.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "content/common/gamepad_messages.h" | 8 #include "content/common/gamepad_messages.h" |
| 9 #include "content/common/gamepad_hardware_buffer.h" | 9 #include "content/common/gamepad_hardware_buffer.h" |
| 10 | 10 |
| 11 #if _MSC_VER <= 1600 | 11 #if defined(_WIN32_WINNT_WIN8) |
| 12 // The Windows 8 SDK defines FACILITY_VISUALCPP in winerror.h. |
| 12 #undef FACILITY_VISUALCPP | 13 #undef FACILITY_VISUALCPP |
| 14 #endif |
| 13 #include <delayimp.h> | 15 #include <delayimp.h> |
| 14 #endif | |
| 15 | 16 |
| 16 #pragma comment(lib, "delayimp.lib") | 17 #pragma comment(lib, "delayimp.lib") |
| 17 #pragma comment(lib, "xinput.lib") | 18 #pragma comment(lib, "xinput.lib") |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 using namespace WebKit; | 22 using namespace WebKit; |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 pad.axes[pad.axesLength++] = -NormalizeAxis(state.Gamepad.sThumbLY); | 172 pad.axes[pad.axesLength++] = -NormalizeAxis(state.Gamepad.sThumbLY); |
| 172 pad.axes[pad.axesLength++] = NormalizeAxis(state.Gamepad.sThumbRX); | 173 pad.axes[pad.axesLength++] = NormalizeAxis(state.Gamepad.sThumbRX); |
| 173 pad.axes[pad.axesLength++] = -NormalizeAxis(state.Gamepad.sThumbRY); | 174 pad.axes[pad.axesLength++] = -NormalizeAxis(state.Gamepad.sThumbRY); |
| 174 } else { | 175 } else { |
| 175 pad.connected = false; | 176 pad.connected = false; |
| 176 } | 177 } |
| 177 } | 178 } |
| 178 } | 179 } |
| 179 | 180 |
| 180 } // namespace content | 181 } // namespace content |
| OLD | NEW |