mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-03 16:39:01 -06:00 
			
		
		
		
	HID: move enable_accelerometer/gyroscope_count initialization into Init() (#2574)
Fixes #2556
This commit is contained in:
		
				
					committed by
					
						
						Yuri Kunde Schlesner
					
				
			
			
				
	
			
			
			
						parent
						
							0c28f5dea6
						
					
				
				
					commit
					c7c1f56ce6
				
			@@ -32,8 +32,8 @@ static u32 next_touch_index;
 | 
			
		||||
static u32 next_accelerometer_index;
 | 
			
		||||
static u32 next_gyroscope_index;
 | 
			
		||||
 | 
			
		||||
static int enable_accelerometer_count = 0; // positive means enabled
 | 
			
		||||
static int enable_gyroscope_count = 0;     // positive means enabled
 | 
			
		||||
static int enable_accelerometer_count; // positive means enabled
 | 
			
		||||
static int enable_gyroscope_count;     // positive means enabled
 | 
			
		||||
 | 
			
		||||
static int pad_update_event;
 | 
			
		||||
static int accelerometer_update_event;
 | 
			
		||||
@@ -323,6 +323,9 @@ void Init() {
 | 
			
		||||
    next_accelerometer_index = 0;
 | 
			
		||||
    next_gyroscope_index = 0;
 | 
			
		||||
 | 
			
		||||
    enable_accelerometer_count = 0;
 | 
			
		||||
    enable_gyroscope_count = 0;
 | 
			
		||||
 | 
			
		||||
    // Create event handles
 | 
			
		||||
    event_pad_or_touch_1 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch1");
 | 
			
		||||
    event_pad_or_touch_2 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch2");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user