Minor menu tweaks and display the vulkan device name in the menus

This commit is contained in:
Magnus Norddahl 2023-10-15 15:23:23 +02:00
commit 9bcef148bf
5 changed files with 26 additions and 10 deletions

View file

@ -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);