BsVideoModeInfo.cpp 1009 B

123456789101112131415161718192021222324252627282930313233343536
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include "RenderAPI/BsVideoModeInfo.h"
  4. namespace bs
  5. {
  6. VideoMode::VideoMode(UINT32 width, UINT32 height, float refreshRate, UINT32 outputIdx)
  7. :mWidth(width), mHeight(height), mRefreshRate(refreshRate), mOutputIdx(outputIdx), mIsCustom(true)
  8. {
  9. }
  10. VideoMode::~VideoMode()
  11. { }
  12. bool VideoMode::operator== (const VideoMode& other) const
  13. {
  14. return mWidth == other.mWidth && mHeight == other.mHeight &&
  15. mOutputIdx == other.mOutputIdx && mRefreshRate == other.mRefreshRate;
  16. }
  17. VideoOutputInfo::~VideoOutputInfo()
  18. {
  19. for (auto& videoMode : mVideoModes)
  20. bs_delete(videoMode);
  21. if (mDesktopVideoMode != nullptr)
  22. bs_delete(mDesktopVideoMode);
  23. }
  24. VideoModeInfo::~VideoModeInfo()
  25. {
  26. for (auto& output : mOutputs)
  27. bs_delete(output);
  28. }
  29. }