mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Add beep sound to platforms with no beep
This commit is contained in:
@@ -18,9 +18,18 @@ namespace PortabilityLayer
|
||||
memcpy(dest + 1, src, sz);
|
||||
}
|
||||
}
|
||||
|
||||
static BeepFunction_t gs_beepFunction = nullptr;
|
||||
}
|
||||
|
||||
void SysBeep(int duration)
|
||||
{
|
||||
PLDrivers::GetSystemServices()->Beep();
|
||||
if (!PLDrivers::GetSystemServices()->Beep())
|
||||
if (PortabilityLayer::gs_beepFunction != nullptr)
|
||||
PortabilityLayer::gs_beepFunction(duration);
|
||||
}
|
||||
|
||||
void SetBeepFunction(BeepFunction_t beepFunction)
|
||||
{
|
||||
PortabilityLayer::gs_beepFunction = beepFunction;
|
||||
}
|
||||
|
Reference in New Issue
Block a user