summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_dialogs.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-02 23:32:00 +0300
committeraunsane <aunsane@gmail.com>2018-02-02 23:34:06 +0300
commit5c145450b7aa7d4a59a7565d196fe67cec4f8880 (patch)
tree4ebc54062545f6ae00d13a8dfd17e0751a39def5 /protocols/Steam/src/steam_dialogs.cpp
parenta7c14294ccfc26f48b5e4c511b7dc65b7e3020a9 (diff)
Steam:
- switched on c++17 language support - forsed update user summaries when got "personastate" message - added detection of VR (?) clent into MirVer
Diffstat (limited to 'protocols/Steam/src/steam_dialogs.cpp')
-rw-r--r--protocols/Steam/src/steam_dialogs.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp
index 568156796f..080b0b3d6b 100644
--- a/protocols/Steam/src/steam_dialogs.cpp
+++ b/protocols/Steam/src/steam_dialogs.cpp
@@ -112,21 +112,21 @@ const char* CSteamTwoFactorDialog::GetTwoFactorCode()
/////////////////////////////////////////////////////////////////////////////////
-CSteamCaptchaDialog::CSteamCaptchaDialog(CSteamProto *proto, BYTE *captchaImage, int captchaImageSize)
+CSteamCaptchaDialog::CSteamCaptchaDialog(CSteamProto *proto, const uint8_t *captchaImage, int captchaImageSize)
: CSteamDlgBase(proto, IDD_CAPTCHA, false),
m_ok(this, IDOK), m_text(this, IDC_TEXT),
m_captchaImage(nullptr)
{
memset(m_captchaText, 0, sizeof(m_captchaText));
m_captchaImageSize = captchaImageSize;
- m_captchaImage = (BYTE*)mir_alloc(captchaImageSize);
+ m_captchaImage = (uint8_t*)mir_alloc(captchaImageSize);
memcpy(m_captchaImage, captchaImage, captchaImageSize);
m_ok.OnClick = Callback(this, &CSteamCaptchaDialog::OnOk);
}
CSteamCaptchaDialog::~CSteamCaptchaDialog()
{
- if(m_captchaImage)
+ if (m_captchaImage)
mir_free(m_captchaImage);
}
@@ -154,8 +154,7 @@ void CSteamCaptchaDialog::OnClose()
INT_PTR CSteamCaptchaDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
- if (msg == WM_PAINT)
- {
+ if (msg == WM_PAINT) {
FIMEMORY *stream = FreeImage_OpenMemory(m_captchaImage, m_captchaImageSize);
FREE_IMAGE_FORMAT fif = FreeImage_GetFileTypeFromMemory(stream, 0);
FIBITMAP *bitmap = FreeImage_LoadFromMemory(fif, stream, 0);