[PATCH vkd3d 2/2] demos: Support building on Windows without -DUNICODE.

Alexandre Julliard julliard at winehq.org
Tue Feb 22 13:00:05 CST 2022


Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
 demos/demo_win32.h | 6 +++---
 demos/gears.c      | 2 +-
 demos/triangle.c   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/demos/demo_win32.h b/demos/demo_win32.h
index d2a54989e9a7..53fbc06351a1 100644
--- a/demos/demo_win32.h
+++ b/demos/demo_win32.h
@@ -200,12 +200,12 @@ static inline bool demo_init(struct demo *demo, void *user_data)
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
     wc.hInstance = GetModuleHandle(NULL);
-    wc.hIcon = LoadIconW(NULL, IDI_APPLICATION);
-    wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
+    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
+    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
     wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
     wc.lpszMenuName = NULL;
     wc.lpszClassName = DEMO_WINDOW_CLASS_NAME;
-    wc.hIconSm = LoadIconW(NULL, IDI_WINLOGO);
+    wc.hIconSm = LoadIcon(NULL, IDI_WINLOGO);
     if (!RegisterClassExW(&wc))
         return false;
 
diff --git a/demos/gears.c b/demos/gears.c
index 2045b3cdd842..9ed87b1084cf 100644
--- a/demos/gears.c
+++ b/demos/gears.c
@@ -877,7 +877,7 @@ static int cxg_main(void)
     return EXIT_SUCCESS;
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && defined(_UNICODE)
 int wmain(void)
 #else
 int main(void)
diff --git a/demos/triangle.c b/demos/triangle.c
index bac1cdc59d88..77bd128957fa 100644
--- a/demos/triangle.c
+++ b/demos/triangle.c
@@ -392,7 +392,7 @@ static int cxt_main(void)
     return EXIT_SUCCESS;
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && defined(_UNICODE)
 int wmain(void)
 #else
 int main(void)
-- 
2.34.1



More information about the wine-devel mailing list