Add beep sound to platforms with no beep

This commit is contained in:
elasota
2021-05-09 23:45:27 -04:00
parent d54ad576bc
commit 24169507bd
21 changed files with 85 additions and 25 deletions

View File

@@ -13,6 +13,7 @@
#include "WindowDef.h"
#include "WindowManager.h"
#include "PLApplication.h"
#include "PLArrayView.h"
#include "PLBigEndian.h"
#include "PLButtonWidget.h"
@@ -471,7 +472,7 @@ namespace PortabilityLayer
Rect2i windowFullRect = WindowManager::GetInstance()->GetWindowFullRect(window);
if (!windowFullRect.Contains(Vec2i(mouseEvent.m_x, mouseEvent.m_y)))
{
PLDrivers::GetSystemServices()->Beep();
SysBeep(1);
continue;
}
}
@@ -834,7 +835,7 @@ namespace PortabilityLayer
// If sound index is 0, play no sound
if (soundIndexes[0] != 0)
PLDrivers::GetSystemServices()->Beep();
SysBeep(1);
const Rect dialogRect = alertResData.m_rect.ToRect();