Commit 91f2911f by Jamie Madill

Add workaround for Unicode compile error.

Chromium builds define UNICODE, while we don't, which confuses the built-in IDC_ARROW macro. With this fix, and http://crbug.com/415983, we can build angle_perf_tests in Chromium. BUG=angle:744 Change-Id: I268a7c11a5b5355cb2485bf10faf750972cf4e30 Reviewed-on: https://chromium-review.googlesource.com/220363Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2ff18fb6
...@@ -380,6 +380,9 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh ...@@ -380,6 +380,9 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh
mParentClassName = name; mParentClassName = name;
mChildClassName = name + "Child"; mChildClassName = name + "Child";
// Work around compile error from not defining "UNICODE" while Chromium does
const LPSTR idcArrow = MAKEINTRESOURCEA(32512);
WNDCLASSEXA parentWindowClass = { 0 }; WNDCLASSEXA parentWindowClass = { 0 };
parentWindowClass.cbSize = sizeof(WNDCLASSEXA); parentWindowClass.cbSize = sizeof(WNDCLASSEXA);
parentWindowClass.style = 0; parentWindowClass.style = 0;
...@@ -388,7 +391,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh ...@@ -388,7 +391,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh
parentWindowClass.cbWndExtra = 0; parentWindowClass.cbWndExtra = 0;
parentWindowClass.hInstance = GetModuleHandle(NULL); parentWindowClass.hInstance = GetModuleHandle(NULL);
parentWindowClass.hIcon = NULL; parentWindowClass.hIcon = NULL;
parentWindowClass.hCursor = LoadCursorA(NULL, IDC_ARROW); parentWindowClass.hCursor = LoadCursorA(NULL, idcArrow);
parentWindowClass.hbrBackground = 0; parentWindowClass.hbrBackground = 0;
parentWindowClass.lpszMenuName = NULL; parentWindowClass.lpszMenuName = NULL;
parentWindowClass.lpszClassName = mParentClassName.c_str(); parentWindowClass.lpszClassName = mParentClassName.c_str();
...@@ -405,7 +408,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh ...@@ -405,7 +408,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh
childWindowClass.cbWndExtra = 0; childWindowClass.cbWndExtra = 0;
childWindowClass.hInstance = GetModuleHandle(NULL); childWindowClass.hInstance = GetModuleHandle(NULL);
childWindowClass.hIcon = NULL; childWindowClass.hIcon = NULL;
childWindowClass.hCursor = LoadCursorA(NULL, IDC_ARROW); childWindowClass.hCursor = LoadCursorA(NULL, idcArrow);
childWindowClass.hbrBackground = 0; childWindowClass.hbrBackground = 0;
childWindowClass.lpszMenuName = NULL; childWindowClass.lpszMenuName = NULL;
childWindowClass.lpszClassName = mChildClassName.c_str(); childWindowClass.lpszClassName = mChildClassName.c_str();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment