1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

Code refactor: get rid of Windows macro min and max.

This commit is contained in:
Sergey Lipskiy 2022-02-19 22:00:57 +07:00
parent f4d83cd9bd
commit 7eef2b3684
9 changed files with 12 additions and 21 deletions

View File

@ -8,10 +8,6 @@
#include "PluginAPI.h" #include "PluginAPI.h"
#include "FrameBuffer.h" #include "FrameBuffer.h"
#ifdef min
#undef min
#endif
bool DisplayWindow::start() bool DisplayWindow::start()
{ {
if (!_start()) if (!_start())

View File

@ -25,6 +25,9 @@
#define __EXT_TXFILTER_H__ #define __EXT_TXFILTER_H__
#ifdef OS_WINDOWS #ifdef OS_WINDOWS
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#define TXHMODULE HMODULE #define TXHMODULE HMODULE
#define DLOPEN(a) LoadLibraryW(a) #define DLOPEN(a) LoadLibraryW(a)

View File

@ -2,6 +2,9 @@
#define GLFUNCTIONS_H #define GLFUNCTIONS_H
#ifdef OS_WINDOWS #ifdef OS_WINDOWS
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
//#define FORCE_UNBUFFERED_DRAWER // Debug option. //#define FORCE_UNBUFFERED_DRAWER // Debug option.
#elif defined(OS_LINUX) #elif defined(OS_LINUX)

View File

@ -1,5 +1,4 @@
#include "glsl_CombinerProgramUniformFactoryAccurate.h" #include "glsl_CombinerProgramUniformFactoryAccurate.h"
#include <Config.h> #include <Config.h>
#include <FrameBuffer.h> #include <FrameBuffer.h>
#include <Textures.h> #include <Textures.h>
@ -8,10 +7,6 @@
#include <cmath> #include <cmath>
#ifdef min
#undef min
#endif
namespace { namespace {
using namespace glsl; using namespace glsl;

View File

@ -8,10 +8,6 @@
#include <cmath> #include <cmath>
#ifdef min
#undef min
#endif
namespace { namespace {
using namespace glsl; using namespace glsl;

View File

@ -26,10 +26,6 @@
#include <Graphics/OpenGLContext/GraphicBuffer/GraphicBufferWrapper.h> #include <Graphics/OpenGLContext/GraphicBuffer/GraphicBufferWrapper.h>
#endif #endif
#ifdef min
#undef min
#endif
using namespace opengl; using namespace opengl;
ContextImpl::ContextImpl() ContextImpl::ContextImpl()
@ -38,7 +34,6 @@ ContextImpl::ContextImpl()
} }
ContextImpl::~ContextImpl() ContextImpl::~ContextImpl()
{ {
} }

View File

@ -2,6 +2,9 @@
#define COMMONPLUGINAPI_H #define COMMONPLUGINAPI_H
#ifdef MUPENPLUSAPI #ifdef MUPENPLUSAPI
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "m64p_plugin.h" #include "m64p_plugin.h"
#else #else
#include "windows/GLideN64_windows.h" #include "windows/GLideN64_windows.h"

View File

@ -1,7 +1,7 @@
#ifndef GLIDEN64_WINDOWS_H #ifndef GLIDEN64_WINDOWS_H
#define GLIDEN64_WINDOWS_H #define GLIDEN64_WINDOWS_H
#include <windows.h> #include "Platform.h"
extern HWND hWnd; extern HWND hWnd;
extern HWND hStatusBar; extern HWND hStatusBar;

View File

@ -1,4 +1,4 @@
#include <Windows.h> #include "Platform.h"
#include "Config.h" #include "Config.h"
#include "../GLideNHQ/inc/png.h" #include "../GLideNHQ/inc/png.h"
@ -118,6 +118,6 @@ void SaveScreenshot(const wchar_t * _folder, const char * _name, int _width, int
} }
if (i == 1000) if (i == 1000)
return; return;
write_png_file(fileName, _width, _height, _data); write_png_file(fileName, _width, _height, _data);
} }