From f73ffe705cb41dcf9cd5adfd1ec2ee5a399a45a1 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 31 Dec 2021 14:02:15 +0200 Subject: [PATCH] msvc project: use multibyte character set (to avoid wide win32 functions) --- andemo.vcxproj | 2 ++ libs/anim/anim.vcxproj | 4 ++-- libs/imago/imago.vcxproj | 4 ++-- libs/imago/src/imago_gl.c | 4 ++-- libs/psys/psys.vcxproj | 4 ++-- libs/treestore/treestore.vcxproj | 4 ++-- src/pc/miniglut.c | 7 +++---- src/pc/miniglut.h | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/andemo.vcxproj b/andemo.vcxproj index 8de57f5..d94e4cc 100644 --- a/andemo.vcxproj +++ b/andemo.vcxproj @@ -73,11 +73,13 @@ Application true v143 + MultiByte Application false v143 + MultiByte diff --git a/libs/anim/anim.vcxproj b/libs/anim/anim.vcxproj index 3b8c939..0c4d738 100644 --- a/libs/anim/anim.vcxproj +++ b/libs/anim/anim.vcxproj @@ -54,14 +54,14 @@ StaticLibrary true v143 - Unicode + MultiByte StaticLibrary false v143 true - Unicode + MultiByte diff --git a/libs/imago/imago.vcxproj b/libs/imago/imago.vcxproj index d9c0abe..fb9f506 100644 --- a/libs/imago/imago.vcxproj +++ b/libs/imago/imago.vcxproj @@ -159,14 +159,14 @@ StaticLibrary true v143 - Unicode + MultiByte StaticLibrary false v143 true - Unicode + MultiByte diff --git a/libs/imago/src/imago_gl.c b/libs/imago/src/imago_gl.c index b69efb5..f6371cf 100644 --- a/libs/imago/src/imago_gl.c +++ b/libs/imago/src/imago_gl.c @@ -285,7 +285,7 @@ unsigned int img_gltexture_read(struct img_io *io) #endif #endif -#ifdef WIN32 +#ifdef _WIN32 #include #endif @@ -301,7 +301,7 @@ static int load_glfunc(void) gl_pixel_storei = (gl_pixel_storei_func)dlsym(RTLD_DEFAULT, "glPixelStorei"); #endif -#ifdef WIN32 +#ifdef _WIN32 HANDLE dll = LoadLibrary("opengl32.dll"); if(dll) { gl_gen_textures = (gl_gen_textures_func)GetProcAddress(dll, "glGenTextures"); diff --git a/libs/psys/psys.vcxproj b/libs/psys/psys.vcxproj index 0692237..22b4ff0 100644 --- a/libs/psys/psys.vcxproj +++ b/libs/psys/psys.vcxproj @@ -55,14 +55,14 @@ StaticLibrary true v143 - Unicode + MultiByte StaticLibrary false v143 true - Unicode + MultiByte diff --git a/libs/treestore/treestore.vcxproj b/libs/treestore/treestore.vcxproj index 2a887bb..7cf988c 100644 --- a/libs/treestore/treestore.vcxproj +++ b/libs/treestore/treestore.vcxproj @@ -52,14 +52,14 @@ StaticLibrary true v143 - Unicode + MultiByte StaticLibrary false v143 true - Unicode + MultiByte diff --git a/src/pc/miniglut.c b/src/pc/miniglut.c index 1efbea3..e4a5150 100644 --- a/src/pc/miniglut.c +++ b/src/pc/miniglut.c @@ -1,6 +1,6 @@ /* MiniGLUT - minimal GLUT subset without dependencies -Copyright (C) 2020 John Tsiombikas +Copyright (C) 2020-2022 John Tsiombikas This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +15,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include #if defined(__unix__) #include @@ -50,7 +49,7 @@ static int have_netwm_fullscr(void); #include #define BUILD_WIN32 -static HRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam); +static LRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam); static HINSTANCE hinst; static HWND win; @@ -1532,7 +1531,7 @@ static void create_window(const char *title) reshape_pending = 1; } -static HRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam) +static LRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam) { static int mouse_x, mouse_y; int x, y, key; diff --git a/src/pc/miniglut.h b/src/pc/miniglut.h index a757369..af13791 100644 --- a/src/pc/miniglut.h +++ b/src/pc/miniglut.h @@ -1,6 +1,6 @@ /* MiniGLUT - minimal GLUT subset without dependencies -Copyright (C) 2020 John Tsiombikas +Copyright (C) 2020-2022 John Tsiombikas This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- 1.7.10.4