Improved Win32 code

Former-commit-id: cfaecc7d8df56fa4cb2a27570531ffbce3fdfe87
This commit is contained in:
Lynix 2014-12-17 13:52:40 +01:00
parent 20607238df
commit 02643f9442
3 changed files with 5 additions and 5 deletions

View File

@ -222,7 +222,7 @@ NzVector2i NzEventImpl::GetMousePosition(const NzWindow& relativeTo)
} }
else else
{ {
NazaraError("Window's handle is invalid"); NazaraError("Invalid window handle");
// Attention que (-1, -1) est une position tout à fait valide et ne doit pas servir de test // Attention que (-1, -1) est une position tout à fait valide et ne doit pas servir de test
return NzVector2i(-1, -1); return NzVector2i(-1, -1);
@ -289,5 +289,5 @@ void NzEventImpl::SetMousePosition(int x, int y, const NzWindow& relativeTo)
SetCursorPos(pos.x, pos.y); SetCursorPos(pos.x, pos.y);
} }
else else
NazaraError("Window's handle is invalid"); NazaraError("Invalid window handle");
} }

View File

@ -79,7 +79,7 @@ m_scrolling(0)
{ {
} }
bool NzWindowImpl::Create(NzVideoMode mode, const NzString& title, nzUInt32 style) bool NzWindowImpl::Create(const NzVideoMode& mode, const NzString& title, nzUInt32 style)
{ {
bool fullscreen = (style & nzWindowStyle_Fullscreen) != 0; bool fullscreen = (style & nzWindowStyle_Fullscreen) != 0;
DWORD win32Style, win32StyleEx; DWORD win32Style, win32StyleEx;
@ -183,7 +183,7 @@ bool NzWindowImpl::Create(NzVideoMode mode, const NzString& title, nzUInt32 styl
GetWindowRect(m_handle, &windowRect); GetWindowRect(m_handle, &windowRect);
m_position.Set(windowRect.left, windowRect.top); m_position.Set(windowRect.left, windowRect.top);
m_size.Set(clientRect.right-clientRect.left, clientRect.bottom-clientRect.top); m_size.Set(clientRect.right - clientRect.left, clientRect.bottom - clientRect.top);
return true; return true;
} }

View File

@ -34,7 +34,7 @@ class NzWindowImpl : NzNonCopyable
NzWindowImpl(NzWindow* parent); NzWindowImpl(NzWindow* parent);
~NzWindowImpl() = default; ~NzWindowImpl() = default;
bool Create(NzVideoMode mode, const NzString& title, nzUInt32 style); bool Create(const NzVideoMode& mode, const NzString& title, nzUInt32 style);
bool Create(NzWindowHandle handle); bool Create(NzWindowHandle handle);
void Destroy(); void Destroy();