mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 23:13:01 +00:00
driver info
This commit is contained in:
parent
fa41c4982d
commit
5c3ff72703
1 changed files with 12 additions and 1 deletions
|
@ -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!");
|
||||
|
|
Loading…
Reference in a new issue