BsVideoModeInfo.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #include "BsVideoModeInfo.h"
  5. namespace BansheeEngine
  6. {
  7. VideoMode::VideoMode(UINT32 width, UINT32 height, float refreshRate, UINT32 outputIdx)
  8. :mWidth(width), mHeight(height), mRefreshRate(refreshRate), mOutputIdx(outputIdx), mIsCustom(true)
  9. {
  10. }
  11. VideoMode::~VideoMode()
  12. { }
  13. bool VideoMode::operator== (const VideoMode& other) const
  14. {
  15. return mWidth == other.mWidth && mHeight == other.mHeight &&
  16. mOutputIdx == other.mOutputIdx && mRefreshRate == other.mRefreshRate;
  17. }
  18. VideoOutputInfo::~VideoOutputInfo()
  19. {
  20. for (auto& videoMode : mVideoModes)
  21. bs_delete(videoMode);
  22. if (mDesktopVideoMode != nullptr)
  23. bs_delete(mDesktopVideoMode);
  24. }
  25. VideoModeInfo::~VideoModeInfo()
  26. {
  27. for (auto& output : mOutputs)
  28. bs_delete(output);
  29. }
  30. }