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