mirror of https://github.com/axmolengine/axmol.git
Fix win64 build
This commit is contained in:
parent
63cfa97024
commit
860400cb8c
|
@ -61,7 +61,7 @@ namespace ui {
|
||||||
|
|
||||||
s_hInstance = ::GetModuleHandleW(nullptr);
|
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)
|
EditBoxImpl* __createSystemEditBox(EditBox* pEditBox)
|
||||||
|
@ -98,7 +98,7 @@ namespace ui {
|
||||||
{
|
{
|
||||||
if (_hwndEdit)
|
if (_hwndEdit)
|
||||||
{
|
{
|
||||||
SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)_prevWndProc);
|
SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)_prevWndProc);
|
||||||
::DestroyWindow(_hwndEdit);
|
::DestroyWindow(_hwndEdit);
|
||||||
_hasFocus = false;
|
_hasFocus = false;
|
||||||
_changedTextManually = false;
|
_changedTextManually = false;
|
||||||
|
@ -125,8 +125,8 @@ namespace ui {
|
||||||
s_hInstance,
|
s_hInstance,
|
||||||
this); // pointer not needed
|
this); // pointer not needed
|
||||||
|
|
||||||
SetWindowLongPtrW(_hwndEdit, GWL_USERDATA, (LONG_PTR)this);
|
SetWindowLongPtrW(_hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
|
||||||
_prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWL_WNDPROC, (LONG_PTR)WindowProc);
|
_prevWndProc = (WNDPROC)SetWindowLongPtrW(_hwndEdit, GWLP_WNDPROC, (LONG_PTR)WindowProc);
|
||||||
|
|
||||||
::SendMessageW(_hwndEdit, EM_LIMITTEXT, this->_maxLength, 0);
|
::SendMessageW(_hwndEdit, EM_LIMITTEXT, this->_maxLength, 0);
|
||||||
s_previousFocusWnd = s_hwndCocos;
|
s_previousFocusWnd = s_hwndCocos;
|
||||||
|
|
|
@ -201,7 +201,7 @@ void ImGuiEXT::loadCustomFonts(void* ud)
|
||||||
auto fontData = FileUtils::getInstance()->getDataFromFile(fontInfo.first);
|
auto fontData = FileUtils::getInstance()->getDataFromFile(fontInfo.first);
|
||||||
CCASSERT(!fontData.isNull(), "Cannot load font for IMGUI");
|
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
|
auto* buffer = fontData.takeBuffer(&bufferSize); // Buffer automatically freed by IMGUI
|
||||||
|
|
||||||
imFonts->AddFontFromMemoryTTF(buffer, bufferSize, fontInfo.second.fontSize * contentZoomFactor, nullptr, imChars);
|
imFonts->AddFontFromMemoryTTF(buffer, bufferSize, fontInfo.second.fontSize * contentZoomFactor, nullptr, imChars);
|
||||||
|
|
Loading…
Reference in New Issue