OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_ |
| 6 #define DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_ |
| 7 |
| 8 #include "device/gamepad/public/cpp/gamepad.h" |
| 9 |
| 10 namespace device { |
| 11 |
| 12 #pragma pack(push, 4) |
| 13 |
| 14 // This structure is intentionally POD and fixed size so that it can be stored |
| 15 // in shared memory between hardware polling threads and the rest of the |
| 16 // browser. |
| 17 class Gamepads { |
| 18 public: |
| 19 static constexpr size_t kItemsLengthCap = 4; |
| 20 |
| 21 // Gamepad data for N separate gamepad devices. |
| 22 Gamepad items[kItemsLengthCap]; |
| 23 }; |
| 24 |
| 25 #pragma pack(pop) |
| 26 |
| 27 } // namespace device |
| 28 |
| 29 #endif // DEVICE_GAMEPAD_PUBLIC_CPP_GAMEPADS_H_ |
OLD | NEW |