mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
feat: 显示卡的“默认”选项中显示实际使用的显示卡
This commit is contained in:
parent
dff22fe3c8
commit
856f428afe
1 changed files with 12 additions and 7 deletions
|
|
@ -417,15 +417,20 @@ IVector<IInspectable> ProfileViewModel::GraphicsCards() const noexcept {
|
|||
std::vector<IInspectable> graphicsCards;
|
||||
|
||||
const std::vector<AdapterInfo>& adapterInfos = AdaptersService::Get().AdapterInfos();
|
||||
graphicsCards.reserve(adapterInfos.size() + 1);
|
||||
if (!adapterInfos.empty()) {
|
||||
graphicsCards.reserve(adapterInfos.size() + 1);
|
||||
|
||||
ResourceLoader resourceLoader =
|
||||
ResourceLoader::GetForCurrentView(CommonSharedConstants::APP_RESOURCE_MAP_ID);
|
||||
hstring defaultStr = resourceLoader.GetString(L"Profile_General_CaptureMethod_Default");
|
||||
graphicsCards.push_back(box_value(defaultStr));
|
||||
ResourceLoader resourceLoader =
|
||||
ResourceLoader::GetForCurrentView(CommonSharedConstants::APP_RESOURCE_MAP_ID);
|
||||
hstring defaultStr = resourceLoader.GetString(L"Profile_General_CaptureMethod_Default");
|
||||
|
||||
for (const AdapterInfo& adapterInfo : adapterInfos) {
|
||||
graphicsCards.push_back(box_value(adapterInfo.description));
|
||||
// “默认”选项中显示实际使用的显卡
|
||||
graphicsCards.push_back(box_value(
|
||||
StrHelper::Concat(defaultStr, L" (", adapterInfos[0].description, L")")));
|
||||
|
||||
for (const AdapterInfo& adapterInfo : adapterInfos) {
|
||||
graphicsCards.push_back(box_value(adapterInfo.description));
|
||||
}
|
||||
}
|
||||
|
||||
return single_threaded_vector(std::move(graphicsCards));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue