mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
EnhancementsWidget: Handle gaps in AA mode list
Mesa (llvmpipe) only reports 4x MSAA, and doesn't report 2x (or 1x, but we implicitly add that). The old logic did not handle this correctly, causing selecting 4x to fail and fall back to None.
This also removes VideoUtils::GetAvailableAntialiasingModes, and thus VideoUtils entirely, as its only other function was removed in 1f74653501
.
This commit is contained in:
@ -23,8 +23,6 @@ add_library(uicommon
|
||||
UICommon.h
|
||||
USBUtils.cpp
|
||||
USBUtils.h
|
||||
VideoUtils.cpp
|
||||
VideoUtils.h
|
||||
)
|
||||
|
||||
target_link_libraries(uicommon
|
||||
|
@ -1,43 +0,0 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "UICommon/VideoUtils.h"
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
namespace VideoUtils
|
||||
{
|
||||
std::vector<std::string> GetAvailableAntialiasingModes(int& msaa_modes)
|
||||
{
|
||||
std::vector<std::string> modes;
|
||||
const auto& aa_modes = g_Config.backend_info.AAModes;
|
||||
const bool supports_ssaa = g_Config.backend_info.bSupportsSSAA;
|
||||
msaa_modes = 0;
|
||||
|
||||
for (const auto mode : aa_modes)
|
||||
{
|
||||
if (mode == 1)
|
||||
{
|
||||
modes.push_back("None");
|
||||
ASSERT_MSG(VIDEO, !supports_ssaa || msaa_modes == 0, "SSAA setting won't work correctly");
|
||||
}
|
||||
else
|
||||
{
|
||||
modes.push_back(std::to_string(mode) + "x MSAA");
|
||||
msaa_modes++;
|
||||
}
|
||||
}
|
||||
|
||||
if (supports_ssaa)
|
||||
{
|
||||
for (const auto mode : aa_modes)
|
||||
{
|
||||
if (mode != 1)
|
||||
modes.push_back(std::to_string(mode) + "x SSAA");
|
||||
}
|
||||
}
|
||||
|
||||
return modes;
|
||||
}
|
||||
} // namespace VideoUtils
|
@ -1,12 +0,0 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace VideoUtils
|
||||
{
|
||||
std::vector<std::string> GetAvailableAntialiasingModes(int& m_msaa_modes);
|
||||
} // namespace VideoUtils
|
Reference in New Issue
Block a user