V3.6.0 exit (#11856)

This commit is contained in:
timlyeee
2022-07-07 14:07:47 +08:00
committed by GitHub
parent 80697b676c
commit b43de1af07
22 changed files with 82 additions and 22 deletions
@@ -24,6 +24,7 @@
****************************************************************************/
#include "platform/win32/modules/SystemWindow.h"
#include <Windows.h>
#include <functional>
#include "base/Log.h"
#include "bindings/event/EventDispatcher.h"
@@ -68,7 +69,12 @@ bool SystemWindow::createWindow(const char *title,
_height = h;
return true;
}
void SystemWindow::closeWindow() {
HWND windowHandle = reinterpret_cast<HWND>(getWindowHandler());
if (windowHandle != 0) {
::SendMessageA(windowHandle, WM_CLOSE, 0, 0);
}
}
uintptr_t SystemWindow::getWindowHandler() const {
return _sdl->getWindowHandler();
}