From ad048dff554bc4134bda104daba6206da2314db3 Mon Sep 17 00:00:00 2001 From: timlyeee <43355299+timlyeee@users.noreply.github.com> Date: Tue, 7 Sep 2021 09:58:52 +0800 Subject: [PATCH] Change Windows Simulator from X86 to X64 (#3866) * change simulator version from x86 to x64 * Fix some bugs for x64 version simulator --- native/gulpfile.js | 2 +- .../frameworks/runtime-src/proj.win32/SimulatorWin.cpp | 1 - .../libsimulator/lib/platform/win32/PlayerEditBoxServiceWin.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/native/gulpfile.js b/native/gulpfile.js index 75f0a866d9..9dbe81e081 100644 --- a/native/gulpfile.js +++ b/native/gulpfile.js @@ -164,7 +164,7 @@ gulp.task('gen-simulator', async function () { var args = []; args.push('-G'); if (isWin32) { - args.push('Visual Studio 15 2017','-A','Win32'); + args.push('Visual Studio 15 2017','-A','x64'); } else { args.push('Xcode'); diff --git a/native/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp b/native/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp index 4a4df0e3c1..312af61cb6 100755 --- a/native/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp +++ b/native/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp @@ -25,7 +25,6 @@ #pragma comment(lib, "comctl32.lib") -#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"") #include "cocos/base/UTF8.h" #include "stdafx.h" diff --git a/native/tools/simulator/libsimulator/lib/platform/win32/PlayerEditBoxServiceWin.cpp b/native/tools/simulator/libsimulator/lib/platform/win32/PlayerEditBoxServiceWin.cpp index 7bf4df2594..92d03fdd08 100755 --- a/native/tools/simulator/libsimulator/lib/platform/win32/PlayerEditBoxServiceWin.cpp +++ b/native/tools/simulator/libsimulator/lib/platform/win32/PlayerEditBoxServiceWin.cpp @@ -37,7 +37,7 @@ PlayerEditBoxServiceWin::PlayerEditBoxServiceWin(HWND hwnd) : _hfont(NULL) { _hwnd = hwnd; - HINSTANCE instance = (HINSTANCE)GetWindowLong(_hwnd, GWL_HINSTANCE); + HINSTANCE instance = (HINSTANCE)GetWindowLong(_hwnd, GWLP_HINSTANCE); DWORD style = WS_CHILD | ES_LEFT | ES_AUTOHSCROLL; _hwndSingle = CreateWindowEx(WS_EX_CLIENTEDGE, (LPCSTR)L"Edit", (LPCSTR)L"", style, 0, 0, 0, 0, _hwnd, NULL, instance, NULL); style = WS_CHILD | ES_MULTILINE | ES_LEFT | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL;