diff options
author | Jamie Madill <jmadill@chromium.org> | 2014-10-09 12:55:32 -0400 |
---|---|---|
committer | Jamie Madill <jmadill@chromium.org> | 2014-10-09 18:13:07 +0000 |
commit | 91f2911f70cef60d0338443cc47ee6544a0781db (patch) | |
tree | b54296e25ce106b6cea723db374b272820e4daf0 /util | |
parent | 2ff18fb6ae8d9bd449bafaf4d82a75e250879c49 (diff) | |
download | angle-91f2911f70cef60d0338443cc47ee6544a0781db.tar.gz |
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/220363
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/win32/Win32Window.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/util/win32/Win32Window.cpp b/util/win32/Win32Window.cpp index ec5a0c0c..4e39885e 100644 --- a/util/win32/Win32Window.cpp +++ b/util/win32/Win32Window.cpp @@ -380,6 +380,9 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh mParentClassName = name; mChildClassName = name + "Child"; + // Work around compile error from not defining "UNICODE" while Chromium does + const LPSTR idcArrow = MAKEINTRESOURCEA(32512); + WNDCLASSEXA parentWindowClass = { 0 }; parentWindowClass.cbSize = sizeof(WNDCLASSEXA); parentWindowClass.style = 0; @@ -388,7 +391,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh parentWindowClass.cbWndExtra = 0; parentWindowClass.hInstance = GetModuleHandle(NULL); parentWindowClass.hIcon = NULL; - parentWindowClass.hCursor = LoadCursorA(NULL, IDC_ARROW); + parentWindowClass.hCursor = LoadCursorA(NULL, idcArrow); parentWindowClass.hbrBackground = 0; parentWindowClass.lpszMenuName = NULL; parentWindowClass.lpszClassName = mParentClassName.c_str(); @@ -405,7 +408,7 @@ bool Win32Window::initialize(const std::string &name, size_t width, size_t heigh childWindowClass.cbWndExtra = 0; childWindowClass.hInstance = GetModuleHandle(NULL); childWindowClass.hIcon = NULL; - childWindowClass.hCursor = LoadCursorA(NULL, IDC_ARROW); + childWindowClass.hCursor = LoadCursorA(NULL, idcArrow); childWindowClass.hbrBackground = 0; childWindowClass.lpszMenuName = NULL; childWindowClass.lpszClassName = mChildClassName.c_str(); |