NoGUI: Add ConfirmMessage() to platform

This commit is contained in:
Connor McLaughlin
2022-08-27 19:00:31 +10:00
parent d2d2e3ae6e
commit c90e2f19fc
10 changed files with 35 additions and 11 deletions

View File

@@ -79,6 +79,14 @@ void Win32NoGUIPlatform::ReportError(const std::string_view& title, const std::s
MessageBoxW(m_hwnd, message_copy.c_str(), title_copy.c_str(), MB_ICONERROR | MB_OK);
}
bool Win32NoGUIPlatform::ConfirmMessage(const std::string_view& title, const std::string_view& message)
{
const std::wstring title_copy(StringUtil::UTF8StringToWideString(title));
const std::wstring message_copy(StringUtil::UTF8StringToWideString(message));
return (MessageBoxW(m_hwnd, message_copy.c_str(), title_copy.c_str(), MB_ICONQUESTION | MB_YESNO) == IDYES);
}
void Win32NoGUIPlatform::SetDefaultConfig(SettingsInterface& si)
{
// noop