summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/lldxhardware.cpp4
-rw-r--r--indra/llwindow/llwindowwin32.cpp38
2 files changed, 21 insertions, 21 deletions
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index d916d95713..392a67b5ce 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -343,7 +343,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
//convert BSTR to std::string
std::wstring ws(caption, SysStringLen(caption));
- std::string caption_str(ws.begin(), ws.end());
+ std::string caption_str = ll_convert_wide_to_string(ws);
LLStringUtil::toLower(caption_str);
bool found = false;
@@ -395,7 +395,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
//convert BSTR to std::string
std::wstring ws(driverVersion, SysStringLen(driverVersion));
- std::string str(ws.begin(), ws.end());
+ std::string str = ll_convert_wide_to_string(ws);
LL_INFOS("AppInit") << " DriverVersion : " << str << LL_ENDL;
if (mDriverVersion.empty())
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f0f7e03691..b53025847f 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1809,7 +1809,7 @@ void* LLWindowWin32::createSharedContext()
mMaxGLVersion = llclamp(mMaxGLVersion, 3.f, 4.6f);
S32 version_major = llfloor(mMaxGLVersion);
- S32 version_minor = llround((mMaxGLVersion-version_major)*10);
+ S32 version_minor = (S32)llround((mMaxGLVersion-version_major)*10);
S32 attribs[] =
{
@@ -2464,12 +2464,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
{
window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next
window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
- window_imp->mKeyVirtualKey = w_param;
+ window_imp->mKeyVirtualKey = (U32)w_param;
window_imp->mRawMsg = u_msg;
- window_imp->mRawWParam = w_param;
- window_imp->mRawLParam = l_param;
+ window_imp->mRawWParam = (U32)w_param;
+ window_imp->mRawLParam = (U32)l_param;
- gKeyboard->handleKeyDown(w_param, mask);
+ gKeyboard->handleKeyDown((U16)w_param, mask);
});
if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress
break;
@@ -2484,14 +2484,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->post([=]()
{
window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
- window_imp->mKeyVirtualKey = w_param;
+ window_imp->mKeyVirtualKey = (U32)w_param;
window_imp->mRawMsg = u_msg;
- window_imp->mRawWParam = w_param;
- window_imp->mRawLParam = l_param;
+ window_imp->mRawWParam = (U32)w_param;
+ window_imp->mRawLParam = (U32)l_param;
{
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYUP");
- gKeyboard->handleKeyUp(w_param, mask);
+ gKeyboard->handleKeyUp((U16)w_param, mask);
}
});
if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress
@@ -2531,7 +2531,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_COMPOSITION");
if (LLWinImm::isAvailable() && window_imp->mPreeditor)
{
- WINDOW_IMP_POST(window_imp->handleCompositionMessage(l_param));
+ WINDOW_IMP_POST(window_imp->handleCompositionMessage((U32)l_param));
return 0;
}
break;
@@ -2552,10 +2552,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_CHAR");
window_imp->post([=]()
{
- window_imp->mKeyCharCode = w_param;
+ window_imp->mKeyCharCode = (U32)w_param;
window_imp->mRawMsg = u_msg;
- window_imp->mRawWParam = w_param;
- window_imp->mRawLParam = l_param;
+ window_imp->mRawWParam = (U32)w_param;
+ window_imp->mRawLParam = (U32)l_param;
// Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need
// to figure out how that works. - Doug
@@ -2979,7 +2979,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->post([=]()
{
- window_imp->mCallbacks->handleDataCopy(window_imp, myType, data);
+ window_imp->mCallbacks->handleDataCopy(window_imp, (S32)myType, data);
delete[] data;
});
};
@@ -3039,8 +3039,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
S32 width = GetSystemMetrics(v_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
S32 height = GetSystemMetrics(v_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
- absolute_x = (raw->data.mouse.lLastX / 65535.0f) * width;
- absolute_y = (raw->data.mouse.lLastY / 65535.0f) * height;
+ absolute_x = (S32)((raw->data.mouse.lLastX / 65535.0f) * width);
+ absolute_y = (S32)((raw->data.mouse.lLastY / 65535.0f) * height);
}
window_imp->mRawMouseDelta.mX += absolute_x - prev_absolute_x;
@@ -3061,8 +3061,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
else
{
- window_imp->mRawMouseDelta.mX += round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
- window_imp->mRawMouseDelta.mY -= round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
+ window_imp->mRawMouseDelta.mX += (S32)round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
+ window_imp->mRawMouseDelta.mY -= (S32)round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
}
}
}
@@ -4658,7 +4658,7 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem()
DXGI_ADAPTER_DESC desc;
p_dxgi_adapter->GetDesc(&desc);
std::wstring description_w((wchar_t*)desc.Description);
- std::string description(description_w.begin(), description_w.end());
+ std::string description = ll_convert_wide_to_string(description_w);
LL_INFOS("Window") << "Graphics adapter index: " << graphics_adapter_index << ", "
<< "Description: " << description << ", "
<< "DeviceId: " << desc.DeviceId << ", "