forked from mia/Aegisub
Define NOMINMAX on Windows and remove workarounds for problems caused by those macros.
Originally committed to SVN as r4732.
This commit is contained in:
parent
a400800b54
commit
58ca596359
7 changed files with 12 additions and 26 deletions
|
@ -43,7 +43,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NOMINMAX"
|
||||
MinimalRebuild="true"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="agi_pre.h"
|
||||
|
@ -109,7 +109,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;WIN64;_DEBUG;_WINDOWS"
|
||||
PreprocessorDefinitions="WIN32;WIN64;_DEBUG;_WINDOWS;NOMINMAX"
|
||||
MinimalRebuild="true"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="agi_pre.h"
|
||||
|
@ -176,7 +176,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NOMINMAX"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="agi_pre.h"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc90.pdb"
|
||||
|
@ -245,7 +245,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;WIN64;NDEBUG;_WINDOWS"
|
||||
PreprocessorDefinitions="WIN32;WIN64;NDEBUG;_WINDOWS;NOMINMAX"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="agi_pre.h"
|
||||
DisableSpecificWarnings="4267"
|
||||
|
|
|
@ -50,10 +50,6 @@
|
|||
#include "video_display.h"
|
||||
#include "video_slider.h"
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
|
||||
/// @brief Constructor
|
||||
/// @param par FrameMain this was spawned from
|
||||
/// @param initialDisplaySize Initial size of the window
|
||||
|
|
|
@ -47,9 +47,6 @@
|
|||
#include "gl_text.h"
|
||||
#include "utils.h"
|
||||
|
||||
#undef max
|
||||
|
||||
|
||||
/// @class OpenGLTextGlyph
|
||||
/// @brief Struct storing the information needed to draw a glyph
|
||||
struct OpenGLTextGlyph {
|
||||
|
|
|
@ -541,10 +541,8 @@ static void trim_text(AssDialogue *diag) {
|
|||
end.ReplaceFirst(&diag->Text, "");
|
||||
}
|
||||
static void expand_times(AssDialogue *src, AssDialogue *dst) {
|
||||
using std::min;
|
||||
using std::max;
|
||||
dst->Start.SetMS(min(dst->Start.GetMS(), src->Start.GetMS()));
|
||||
dst->End.SetMS(max(dst->End.GetMS(), src->End.GetMS()));
|
||||
dst->Start.SetMS(std::min(dst->Start.GetMS(), src->Start.GetMS()));
|
||||
dst->End.SetMS(std::max(dst->End.GetMS(), src->End.GetMS()));
|
||||
}
|
||||
|
||||
/// @brief Recombine
|
||||
|
|
|
@ -512,8 +512,7 @@ void VideoDisplay::OnKey(wxKeyEvent &event) {
|
|||
}
|
||||
|
||||
void VideoDisplay::SetZoom(double value) {
|
||||
using std::max;
|
||||
zoomValue = max(value, .125);
|
||||
zoomValue = std::max(value, .125);
|
||||
zoomBox->SetValue(wxString::Format("%g%%", zoomValue * 100.));
|
||||
UpdateSize();
|
||||
}
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
|
||||
#include <libaegisub/log.h>
|
||||
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
// These must be included before local headers.
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/GL.h>
|
||||
|
@ -216,8 +213,8 @@ void VideoOutGL::InitTextures(int width, int height, GLenum format, int bpp, boo
|
|||
// Width and height of the area read from the frame data
|
||||
int sourceX = col * textureArea;
|
||||
int sourceY = row * textureArea;
|
||||
ti.sourceW = min(frameWidth - sourceX, maxTextureSize);
|
||||
ti.sourceH = min(frameHeight - sourceY, maxTextureSize);
|
||||
ti.sourceW = std::min(frameWidth - sourceX, maxTextureSize);
|
||||
ti.sourceH = std::min(frameHeight - sourceY, maxTextureSize);
|
||||
|
||||
// Used instead of GL_PACK_SKIP_ROWS/GL_PACK_SKIP_PIXELS due to
|
||||
// performance issues with the emulation
|
||||
|
@ -226,7 +223,7 @@ void VideoOutGL::InitTextures(int width, int height, GLenum format, int bpp, boo
|
|||
int textureHeight = SmallestPowerOf2(ti.sourceH);
|
||||
int textureWidth = SmallestPowerOf2(ti.sourceW);
|
||||
if (!supportsRectangularTextures) {
|
||||
textureWidth = textureHeight = max(textureWidth, textureHeight);
|
||||
textureWidth = textureHeight = std::max(textureWidth, textureHeight);
|
||||
}
|
||||
|
||||
// Location where this texture is placed
|
||||
|
|
|
@ -125,7 +125,6 @@ bool VisualToolScale::InitializeHold() {
|
|||
}
|
||||
|
||||
void VisualToolScale::UpdateHold() {
|
||||
using std::max;
|
||||
// Deltas
|
||||
int deltaX = video.x - startX;
|
||||
int deltaY = startY - video.y;
|
||||
|
@ -135,8 +134,8 @@ void VisualToolScale::UpdateHold() {
|
|||
}
|
||||
|
||||
// Calculate
|
||||
curScaleX = max(deltaX*1.25f + origScaleX, 0.f);
|
||||
curScaleY = max(deltaY*1.25f + origScaleY, 0.f);
|
||||
curScaleX = std::max(deltaX*1.25f + origScaleX, 0.f);
|
||||
curScaleY = std::max(deltaY*1.25f + origScaleY, 0.f);
|
||||
|
||||
// Oh Snap
|
||||
if (ctrlDown) {
|
||||
|
|
Loading…
Reference in a new issue