Fix windows compilation.
This commit is contained in:
parent
b45385e8c7
commit
b17ba8b3a7
23 changed files with 85 additions and 53 deletions
|
@ -11,14 +11,15 @@
|
|||
|
||||
LRESULT CALLBACK FreeWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
Win32Window::Win32Window()
|
||||
Win32Window::Win32Window(mt::Window* window)
|
||||
: IPlatformWindow(window)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::unique_ptr<Win32Window> Win32Window::Create()
|
||||
std::unique_ptr<Win32Window> Win32Window::Create(mt::Window* window)
|
||||
{
|
||||
return std::make_unique<Win32Window>();
|
||||
return std::make_unique<Win32Window>(window);
|
||||
}
|
||||
|
||||
HWND Win32Window::GetHandle() const
|
||||
|
@ -85,11 +86,11 @@ LRESULT CALLBACK Win32Window::WindowProc(UINT message, WPARAM wParam, LPARAM lPa
|
|||
case WM_CHAR:
|
||||
{
|
||||
auto key_event = std::make_unique<KeyboardEvent>();
|
||||
key_event->SetAction(KeyboardEvent::Action::Pressed);
|
||||
key_event->setAction(KeyboardEvent::Action::Pressed);
|
||||
|
||||
auto keyChar = (wchar_t)wParam;
|
||||
key_event->SetKeyString(StringUtils::convert(std::wstring(1, keyChar)));
|
||||
mDesktopManager->OnUiEvent(std::move(key_event));
|
||||
key_event->setKeyString(StringUtils::convert(std::wstring(1, keyChar)));
|
||||
mDesktopManager->onUiEvent(std::move(key_event));
|
||||
}
|
||||
|
||||
case WM_PAINT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue