2
0

BsVideoModeInfo.cpp 760 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "BsVideoModeInfo.h"
  2. namespace BansheeEngine
  3. {
  4. VideoMode::VideoMode(UINT32 width, UINT32 height, float refreshRate, UINT32 outputIdx)
  5. :mWidth(width), mHeight(height), mRefreshRate(refreshRate), mOutputIdx(outputIdx), mIsCustom(true)
  6. {
  7. }
  8. VideoMode::~VideoMode()
  9. { }
  10. bool VideoMode::operator== (const VideoMode& other) const
  11. {
  12. return mWidth == other.mWidth && mHeight == other.mHeight &&
  13. mOutputIdx == other.mOutputIdx && mRefreshRate == other.mRefreshRate;
  14. }
  15. VideoOutputInfo::~VideoOutputInfo()
  16. {
  17. for (auto& videoMode : mVideoModes)
  18. bs_delete(videoMode);
  19. if (mDesktopVideoMode != nullptr)
  20. bs_delete(mDesktopVideoMode);
  21. }
  22. VideoModeInfo::~VideoModeInfo()
  23. {
  24. for (auto& output : mOutputs)
  25. bs_delete(output);
  26. }
  27. }