Skip to content

Commit

Permalink
Apply some MSC_VER special cases to WIN32 as well (thanks Vincent!)
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Apr 11, 2019
1 parent f204450 commit 522df29
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mojoshader_common.c
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions mojoshader_opengl.c
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions mojoshader_preprocessor.c
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 522df29

Please sign in to comment.