source/Platform/Win32/Win32Display.cpp: in setSize() add cast to silence compiler warnings.
This commit is contained in:
parent
effc723f54
commit
6f53b0c069
1 changed files with 6 additions and 6 deletions
|
|
@ -48,8 +48,8 @@ bool Win32Display::create(DisplayDescription description)
|
|||
centerWindow(x, y, description.mode.width, description.mode.height);
|
||||
|
||||
// Create window.
|
||||
m_handle = CreateWindowExA(0, WND_CLASSNAME, "", flags,
|
||||
x, y, description.mode.width, description.mode.height,
|
||||
m_handle = CreateWindowExA(0, WND_CLASSNAME, "", flags,
|
||||
x, y, description.mode.width, description.mode.height,
|
||||
NULL, NULL, GetModuleHandle(NULL), (LPVOID) this);
|
||||
|
||||
if (!m_handle) {
|
||||
|
|
@ -86,7 +86,7 @@ bool Win32Display::isValid()
|
|||
void Win32Display::setSize(unsigned int width, unsigned int height)
|
||||
{
|
||||
int w, h;
|
||||
RECT rect = {0, 0, width, height};
|
||||
RECT rect = {0, 0, (LONG) width, (LONG) height};
|
||||
AdjustWindowRect(&rect, GetWindowLong(m_handle, GWL_STYLE), false);
|
||||
|
||||
w = rect.right - rect.left;
|
||||
|
|
@ -130,7 +130,7 @@ void Win32Display::showCursor(bool value)
|
|||
|
||||
void Win32Display::setIcon(const std::string& icon)
|
||||
{
|
||||
HICON hIcon = (HICON) ::LoadImage(0, icon.c_str(), IMAGE_ICON,
|
||||
HICON hIcon = (HICON) ::LoadImage(0, icon.c_str(), IMAGE_ICON,
|
||||
0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE);
|
||||
|
||||
if (hIcon) {
|
||||
|
|
@ -241,7 +241,7 @@ void Win32Display::processMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK Win32Display::staticWndProc(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT CALLBACK Win32Display::staticWndProc(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
Win32Display *display;
|
||||
|
||||
|
|
@ -261,4 +261,4 @@ LRESULT CALLBACK Win32Display::staticWndProc(HWND handle, UINT message, WPARAM w
|
|||
return DefWindowProc(handle, message, wParam, lParam);
|
||||
}
|
||||
|
||||
} // namespace sp
|
||||
} // namespace sp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue