Timber Wolf - updated via keymap, reduced eeprom writing from backlight code (#9876)
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
		
							parent
							
								
									9758bcb28b
								
							
						
					
					
						commit
						08f31f664a
					
				
					 4 changed files with 18 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -18,10 +18,12 @@
 | 
			
		|||
 | 
			
		||||
bool led_update_kb(led_t led_state) {
 | 
			
		||||
    bool runDefault = led_update_user(led_state);
 | 
			
		||||
    if (led_state.caps_lock) {
 | 
			
		||||
      backlight_enable();
 | 
			
		||||
    } else {
 | 
			
		||||
		backlight_disable();
 | 
			
		||||
	}
 | 
			
		||||
    if(runDefault) {
 | 
			
		||||
        if (led_state.caps_lock) {
 | 
			
		||||
            backlight_level_noeeprom(get_backlight_level());
 | 
			
		||||
        } else {
 | 
			
		||||
            backlight_set(0);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return runDefault;
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue