driver info

This commit is contained in:
tildearrow 2024-05-16 17:41:40 -05:00
parent fa41c4982d
commit 5c3ff72703

View file

@ -473,6 +473,7 @@ void FurnaceGUIRenderDX9::preInit(const DivConfig& conf) {
}
bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
D3DADAPTER_IDENTIFIER9 adapterInfo;
SDL_SysWMinfo sysWindow;
SDL_VERSION(&sysWindow.version);
@ -508,7 +509,17 @@ bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
}
priv->present.hDeviceWindow=window;
HRESULT result=iface->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,window,D3DCREATE_HARDWARE_VERTEXPROCESSING,&priv->present,&device);
HRESULT result=iface->GetAdapterIdentifier(D3DADAPTER_DEFAULT,0,&adapterInfo);
if (result==D3D_OK) {
vendorName=fmt::sprintf("0x%.4X",adapterInfo.VendorId);
deviceName=fmt::sprintf("%s (%s)",adapterInfo.Description,adapterInfo.DeviceName);
apiVersion=fmt::sprintf("%.8X %.8X %s",adapterInfo.DriverVersion.HighPart,adapterInfo.DriverVersion.LowPart,adapterInfo.Driver);
} else {
logW("could not get adapter info! %.8x",result);
}
result=iface->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,window,D3DCREATE_HARDWARE_VERTEXPROCESSING,&priv->present,&device);
if (result!=D3D_OK) {
logW("no hardware vertex processing!");