소스 검색

hid: Use HID_NUM_LAYOUTS constant for indicating size of the layouts array

Gets rid of the use of a magic constant
Lioncash 8 년 전
부모
커밋
95103a1b7b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/hle/service/hid/hid.h

+ 1 - 1
src/core/hle/service/hid/hid.h

@@ -380,7 +380,7 @@ static_assert(sizeof(ControllerLayout) == 0x350,
 
 struct Controller {
     ControllerHeader header;
-    std::array<ControllerLayout, 7> layouts;
+    std::array<ControllerLayout, HID_NUM_LAYOUTS> layouts;
     std::array<u8, 0x2a70> unk_1;
     ControllerMAC mac_left;
     ControllerMAC mac_right;