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 const size_t kItemsLengthCap = 4; | |
dcheng
2017/04/12 23:33:27
Nit: constexpr
juncai
2017/04/13 23:55:52
Done.
| |
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 |