Fix win64 build

This commit is contained in:
halx99 2021-08-27 08:33:17 +08:00
parent 63cfa97024
commit 860400cb8c
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@ namespace ui {
s_hInstance = ::GetModuleHandleW(nullptr);
s_prevCocosWndProc = (WNDPROC)SetWindowLongPtrW(s_hwndCocos, GWL_WNDPROC, (LONG_PTR)hookGLFWWindowProc);
s_prevCocosWndProc = (WNDPROC)SetWindowLongPtrW(s_hwndCocos, GWLP_WNDPROC, (LONG_PTR)hookGLFWWindowProc);
}
EditBoxImpl* __createSystemEditBox(EditBox* pEditBox)
@ -98,7 +98,7 @@ namespace ui {
{
if (_hwndEdit)
{
SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)_prevWndProc);
SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)_prevWndProc);
::DestroyWindow(_hwndEdit);
_hasFocus = false;
_changedTextManually = false;
@ -125,8 +125,8 @@ namespace ui {
s_hInstance,
this); // pointer not needed
SetWindowLongPtrW(_hwndEdit, GWL_USERDATA, (LONG_PTR)this);
_prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)WindowProc);
SetWindowLongPtrW(_hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
_prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)WindowProc);
::SendMessageW(_hwndEdit, EM_LIMITTEXT, this->_maxLength, 0);
s_previousFocusWnd = s_hwndCocos;

View File

@ -201,7 +201,7 @@ void ImGuiEXT::loadCustomFonts(void* ud)
auto fontData = FileUtils::getInstance()->getDataFromFile(fontInfo.first);
CCASSERT(!fontData.isNull(), "Cannot load font for IMGUI");
long bufferSize = 0;
ssize_t bufferSize = 0;
auto* buffer = fontData.takeBuffer(&bufferSize); // Buffer automatically freed by IMGUI
imFonts->AddFontFromMemoryTTF(buffer, bufferSize, fontInfo.second.fontSize * contentZoomFactor, nullptr, imChars);