Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11797 from Dentomologist/remove_unused_videoutils…
…_function

VideoUtils: Remove unused function GetAvailableResolutions
  • Loading branch information
leoetlino committed Apr 27, 2023
2 parents c19be2a + 1f74653 commit a75d22d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
37 changes: 0 additions & 37 deletions Source/Core/UICommon/VideoUtils.cpp
Expand Up @@ -6,45 +6,8 @@
#include "Common/Assert.h"
#include "VideoCommon/VideoConfig.h"

#ifdef _WIN32
#include <Windows.h>
#endif

#ifdef HAVE_XRANDR
#include "UICommon/X11Utils.h"
#endif

namespace VideoUtils
{
#if !defined(__APPLE__)
std::vector<std::string> GetAvailableResolutions(X11Utils::XRRConfiguration* xrr_config)
{
std::vector<std::string> resos;
#ifdef _WIN32
DWORD iModeNum = 0;
DEVMODE dmi;
ZeroMemory(&dmi, sizeof(dmi));
dmi.dmSize = sizeof(dmi);

while (EnumDisplaySettings(nullptr, iModeNum++, &dmi) != 0)
{
char res[100];
sprintf(res, "%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight);
std::string strRes(res);
// Only add unique resolutions
if (std::find(resos.begin(), resos.end(), strRes) == resos.end())
{
resos.push_back(strRes);
}
ZeroMemory(&dmi, sizeof(dmi));
}
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
xrr_config->AddResolutions(resos);
#endif
return resos;
}
#endif

std::vector<std::string> GetAvailableAntialiasingModes(int& msaa_modes)
{
std::vector<std::string> modes;
Expand Down
9 changes: 0 additions & 9 deletions Source/Core/UICommon/VideoUtils.h
Expand Up @@ -6,16 +6,7 @@
#include <string>
#include <vector>

namespace X11Utils
{
class XRRConfiguration;
}

namespace VideoUtils
{
#if !defined(__APPLE__)
std::vector<std::string> GetAvailableResolutions(X11Utils::XRRConfiguration* xrr_config);
#endif

std::vector<std::string> GetAvailableAntialiasingModes(int& m_msaa_modes);
} // namespace VideoUtils

0 comments on commit a75d22d

Please sign in to comment.