mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-31 16:09:03 -05:00 
			
		
		
		
	Avoid initializing single-joycon layouts with handheld controller
This commit is contained in:
		| @@ -83,7 +83,10 @@ private: | ||||
|         controller_header.left_color_buttons = JOYCON_BUTTONS_NEON_BLUE; | ||||
|  | ||||
|         for (size_t controller = 0; controller < mem.controllers.size(); controller++) { | ||||
|             for (int index = 0; index < HID_NUM_LAYOUTS; index++) { | ||||
|             for (int index = 0; | ||||
|                  index < | ||||
|                  (controller != Controller_Handheld ? HID_NUM_LAYOUTS : HID_NUM_LAYOUTS_HANDHELD); | ||||
|                  index++) { | ||||
|                 ControllerLayout& layout = mem.controllers[controller].layouts[index]; | ||||
|                 layout.header.num_entries = HID_NUM_ENTRIES; | ||||
|                 layout.header.max_entry_index = HID_NUM_ENTRIES - 1; | ||||
|   | ||||
| @@ -13,6 +13,7 @@ namespace Service::HID { | ||||
|  | ||||
| constexpr u32 HID_NUM_ENTRIES = 17; | ||||
| constexpr u32 HID_NUM_LAYOUTS = 7; | ||||
| constexpr u32 HID_NUM_LAYOUTS_HANDHELD = 2; | ||||
| constexpr s32 HID_JOYSTICK_MAX = 0x8000; | ||||
| constexpr s32 HID_JOYSTICK_MIN = -0x8000; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zach Hilman
					Zach Hilman