From 4b8e8bed6e7007144f803ec64485168c82273c6f Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 19 Jan 2024 16:27:19 +0000 Subject: [PATCH] [d3d9] Move operators out of dxvk namespace --- src/d3d9/d3d9_util.h | 67 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/src/d3d9/d3d9_util.h b/src/d3d9/d3d9_util.h index 3003b5ac..89147dac 100644 --- a/src/d3d9/d3d9_util.h +++ b/src/d3d9/d3d9_util.h @@ -204,38 +204,6 @@ namespace dxvk { bool IsDepthFormat(D3D9Format Format); - inline bool operator == (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { - return a.X == b.X && - a.Y == b.Y && - a.Width == b.Width && - a.Height == b.Height && - a.MinZ == b.MinZ && - a.MaxZ == b.MaxZ; - } - - inline bool operator != (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { - return !(a == b); - } - - inline bool operator == (const RECT& a, const RECT& b) { - return a.left == b.left && - a.right == b.right && - a.top == b.top && - a.bottom == b.bottom; - } - - inline bool operator != (const RECT& a, const RECT& b) { - return !(a == b); - } - - inline bool operator == (const POINT& a, const POINT& b) { - return a.x == b.x && a.y == b.y; - } - - inline bool operator != (const POINT& a, const POINT& b) { - return !(a == b); - } - inline bool IsPoolManaged(D3DPOOL Pool) { return Pool == D3DPOOL_MANAGED || Pool == D3DPOOL_MANAGED_EX; } @@ -295,4 +263,37 @@ namespace dxvk { return D3D9TextureStageStateTypes(Type - 1); } -} \ No newline at end of file +} + + +inline bool operator == (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { + return a.X == b.X && + a.Y == b.Y && + a.Width == b.Width && + a.Height == b.Height && + a.MinZ == b.MinZ && + a.MaxZ == b.MaxZ; +} + +inline bool operator != (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { + return !(a == b); +} + +inline bool operator == (const RECT& a, const RECT& b) { + return a.left == b.left && + a.right == b.right && + a.top == b.top && + a.bottom == b.bottom; +} + +inline bool operator != (const RECT& a, const RECT& b) { + return !(a == b); +} + +inline bool operator == (const POINT& a, const POINT& b) { + return a.x == b.x && a.y == b.y; +} + +inline bool operator != (const POINT& a, const POINT& b) { + return !(a == b); +}