diff options
author | ChillerDrgon <ChillerDragon@gmail.com> | 2022-04-22 11:49:25 +0200 |
---|---|---|
committer | ChillerDragon <chillerdragon@gmail.com> | 2023-06-13 11:43:41 +0200 |
commit | fea2fefb2c3395f23eb85dde07cd47b83ba66470 (patch) | |
tree | e0039bae2b1174411425584f4b35b7ec2ec17b75 | |
parent | 26d24ec061d44e6084b2d77a9b8a0a48e354eba6 (diff) |
Fix division by zero in headless client
-rw-r--r-- | src/engine/client/graphics_threaded_null.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/engine/client/graphics_threaded_null.h b/src/engine/client/graphics_threaded_null.h index 1afa53b9a..eae76c6a2 100644 --- a/src/engine/client/graphics_threaded_null.h +++ b/src/engine/client/graphics_threaded_null.h @@ -12,6 +12,8 @@ public: { m_ScreenWidth = 800; m_ScreenHeight = 600; + m_DesktopScreenWidth = 800; + m_DesktopScreenHeight = 600; }; virtual void ClipEnable(int x, int y, int w, int h) {}; @@ -28,7 +30,13 @@ public: virtual int MemoryUsage() const { return 0; }; virtual void MapScreen(float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY) {}; - virtual void GetScreen(float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY) {}; + virtual void GetScreen(float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY) + { + *pTopLeftX = 0; + *pTopLeftY = 0; + *pBottomRightX = 600; + *pBottomRightY = 600; + }; virtual void LinesBegin() {}; virtual void LinesEnd() {}; |