msvc project: use multibyte character set (to avoid wide win32 functions)
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Fri, 31 Dec 2021 12:02:15 +0000 (14:02 +0200)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Fri, 31 Dec 2021 12:02:15 +0000 (14:02 +0200)
andemo.vcxproj
libs/anim/anim.vcxproj
libs/imago/imago.vcxproj
libs/imago/src/imago_gl.c
libs/psys/psys.vcxproj
libs/treestore/treestore.vcxproj
src/pc/miniglut.c
src/pc/miniglut.h

index 8de57f5..d94e4cc 100644 (file)
     <ConfigurationType>Application</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index 3b8c939..0c4d738 100644 (file)
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index d9c0abe..fb9f506 100644 (file)
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index b69efb5..f6371cf 100644 (file)
@@ -285,7 +285,7 @@ unsigned int img_gltexture_read(struct img_io *io)
 #endif
 
 #endif
-#ifdef WIN32
+#ifdef _WIN32
 #include <windows.h>
 #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");
index 0692237..22b4ff0 100644 (file)
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index 2a887bb..7cf988c 100644 (file)
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <PlatformToolset>v143</PlatformToolset>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index 1efbea3..e4a5150 100644 (file)
@@ -1,6 +1,6 @@
 /*
 MiniGLUT - minimal GLUT subset without dependencies
-Copyright (C) 2020  John Tsiombikas <nuclear@member.fsf.org>
+Copyright (C) 2020-2022  John Tsiombikas <nuclear@member.fsf.org>
 
 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 <https://www.gnu.org/licenses/>.
  */
-#include <stdio.h>
 #if defined(__unix__)
 
 #include <X11/Xlib.h>
@@ -50,7 +49,7 @@ static int have_netwm_fullscr(void);
 #include <windows.h>
 #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;
index a757369..af13791 100644 (file)
@@ -1,6 +1,6 @@
 /*
 MiniGLUT - minimal GLUT subset without dependencies
-Copyright (C) 2020  John Tsiombikas <nuclear@member.fsf.org>
+Copyright (C) 2020-2022  John Tsiombikas <nuclear@member.fsf.org>
 
 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