mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00:00 
			
		
		
		
	Kernel: Add CommandLine option to disable or enable the PC speaker
By default, we disable the PC speaker as it's quite annoying when using the text mode console.
This commit is contained in:
		
							parent
							
								
									8dbbef9b5c
								
							
						
					
					
						commit
						69f054616d
					
				
					 5 changed files with 19 additions and 0 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
|  */ | ||||
| 
 | ||||
| #include <AK/StdLibExtras.h> | ||||
| #include <Kernel/CommandLine.h> | ||||
| #include <Kernel/Debug.h> | ||||
| #include <Kernel/Devices/DeviceManagement.h> | ||||
| #include <Kernel/Devices/HID/HIDManagement.h> | ||||
|  | @ -321,6 +322,8 @@ void VirtualConsole::flush_dirty_lines() | |||
| 
 | ||||
| void VirtualConsole::beep() | ||||
| { | ||||
|     if (!kernel_command_line().is_pc_speaker_enabled()) | ||||
|         return; | ||||
|     PCSpeaker::tone_on(440); | ||||
|     IO::delay(10000); | ||||
|     PCSpeaker::tone_off(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A