Skip to content
Permalink
Browse files
Apply some MSC_VER special cases to WIN32 as well (thanks Vincent!)
  • Loading branch information
flibitijibibo committed Apr 11, 2019
1 parent f204450 commit 522df29937a6c3a84592ea69e02c2ddcded6b3cc
Showing with 4 additions and 6 deletions.
  1. +1 −1 mojoshader_common.c
  2. +1 −2 mojoshader_opengl.c
  3. +2 −3 mojoshader_preprocessor.c
@@ -576,7 +576,7 @@ int errorlist_add_va(ErrorList *list, const char *_fname,
// In this case we make another copy of va and fetch the length only
// with another call to _vscprintf

#ifdef _MSC_VER
#ifdef _WIN32
if (len == -1)
{
va_copy(ap, va);
@@ -13,8 +13,7 @@
#include <stdarg.h>
#include <assert.h>

// !!! FIXME: most of these _MSC_VER should probably be _WINDOWS?
#ifdef _MSC_VER
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h> // GL headers need this for WINGDIAPI definition.
#endif
@@ -201,8 +201,7 @@ void MOJOSHADER_print_debug_token(const char *subsystem, const char *token,

#if !MOJOSHADER_FORCE_INCLUDE_CALLBACKS

// !!! FIXME: most of these _MSC_VER should probably be _WINDOWS?
#ifdef _MSC_VER
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h> // GL headers need this for WINGDIAPI definition.
#else
@@ -218,7 +217,7 @@ int MOJOSHADER_internal_include_open(MOJOSHADER_includeType inctype,
MOJOSHADER_malloc m, MOJOSHADER_free f,
void *d)
{
#ifdef _MSC_VER
#ifdef _WIN32
WCHAR wpath[MAX_PATH];
if (!MultiByteToWideChar(CP_UTF8, 0, fname, -1, wpath, MAX_PATH))
return 0;

0 comments on commit 522df29

Please sign in to comment.