Minor menu tweaks and display the vulkan device name in the menus
This commit is contained in:
parent
6d6599189b
commit
9bcef148bf
5 changed files with 26 additions and 10 deletions
|
|
@ -260,6 +260,8 @@ xx(Mididevices)
|
|||
xx(Aldevices)
|
||||
xx(Alresamplers)
|
||||
|
||||
xx(Vkdevices)
|
||||
|
||||
// Decorate compatibility functions
|
||||
xx(BuiltinRandom)
|
||||
xx(BuiltinRandom2)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ PClass *DefaultOptionMenuClass;
|
|||
|
||||
void I_BuildALDeviceList(FOptionValues *opt);
|
||||
void I_BuildALResamplersList(FOptionValues *opt);
|
||||
|
||||
void I_BuildVKDeviceList(FOptionValues *opt);
|
||||
|
||||
|
||||
DEFINE_GLOBAL_NAMED(OptionSettings, OptionMenuSettings)
|
||||
|
|
@ -1682,6 +1682,11 @@ void M_CreateMenus()
|
|||
{
|
||||
I_BuildALResamplersList(*opt);
|
||||
}
|
||||
opt = OptionValues.CheckKey(NAME_Vkdevices);
|
||||
if (opt != nullptr)
|
||||
{
|
||||
I_BuildVKDeviceList(*opt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include <zvulkan/vulkancompatibledevice.h>
|
||||
#include "engineerrors.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "menu.h"
|
||||
|
||||
FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames, int maxFrames = -1);
|
||||
|
||||
|
|
@ -97,6 +98,16 @@ CCMD(vk_listdevices)
|
|||
}
|
||||
}
|
||||
|
||||
void I_BuildVKDeviceList(FOptionValues* opt)
|
||||
{
|
||||
for (size_t i = 0; i < SupportedDevices.size(); i++)
|
||||
{
|
||||
unsigned int idx = opt->mValues.Reserve(1);
|
||||
opt->mValues[idx].Value = (double)i;
|
||||
opt->mValues[idx].Text = SupportedDevices[i].Device->Properties.Properties.deviceName;
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanError(const char* text)
|
||||
{
|
||||
throw CVulkanError(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue