summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
Diffstat (limited to 'src/video')
-rw-r--r--src/video/allegro_v.cpp1
-rw-r--r--src/video/sdl2_v.cpp5
-rw-r--r--src/video/sdl_v.cpp5
-rw-r--r--src/video/win32_v.cpp9
4 files changed, 8 insertions, 12 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 9b0bef1ac..9cab0805e 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -26,7 +26,6 @@
#include "../thread.h"
#include "allegro_v.h"
#include <allegro.h>
-#include <algorithm>
#include "../safeguards.h"
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp
index ea2a88bb9..dee0ff93d 100644
--- a/src/video/sdl2_v.cpp
+++ b/src/video/sdl2_v.cpp
@@ -26,7 +26,6 @@
#include <SDL.h>
#include <mutex>
#include <condition_variable>
-#include <algorithm>
#ifdef __EMSCRIPTEN__
# include <emscripten.h>
# include <emscripten/html5.h>
@@ -635,8 +634,8 @@ int VideoDriver_SDL::PollEvent()
// Force a redraw of the entire screen.
_num_dirty_rects = MAX_DIRTY_RECTS + 1;
} else if (ev.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
- int w = max(ev.window.data1, 64);
- int h = max(ev.window.data2, 64);
+ int w = std::max(ev.window.data1, 64);
+ int h = std::max(ev.window.data2, 64);
CreateMainSurface(w, h, w != ev.window.data1 || h != ev.window.data2);
} else if (ev.window.event == SDL_WINDOWEVENT_ENTER) {
// mouse entered the window, enable cursor
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 4f5167335..3fae8e69b 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -25,7 +25,6 @@
#include <SDL.h>
#include <mutex>
#include <condition_variable>
-#include <algorithm>
#include "../safeguards.h"
@@ -583,8 +582,8 @@ int VideoDriver_SDL::PollEvent()
break;
case SDL_VIDEORESIZE: {
- int w = max(ev.resize.w, 64);
- int h = max(ev.resize.h, 64);
+ int w = std::max(ev.resize.w, 64);
+ int h = std::max(ev.resize.h, 64);
CreateMainSurface(w, h);
break;
}
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index fa780dd3d..29b85985f 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -27,7 +27,6 @@
#include <imm.h>
#include <mutex>
#include <condition_variable>
-#include <algorithm>
#include "../safeguards.h"
@@ -903,8 +902,8 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
w = r->right - r->left - (r2.right - r2.left);
h = r->bottom - r->top - (r2.bottom - r2.top);
- w = max(w, 64);
- h = max(h, 64);
+ w = std::max(w, 64);
+ h = std::max(h, 64);
SetRect(&r2, 0, 0, w, h);
AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
@@ -1037,8 +1036,8 @@ static bool AllocateDibSection(int w, int h, bool force)
HDC dc;
uint bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
- w = max(w, 64);
- h = max(h, 64);
+ w = std::max(w, 64);
+ h = std::max(h, 64);
if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");