[saco] Implement DXUTD3DDeviceTypeToString(...)

This commit is contained in:
RD42
2024-05-18 22:34:13 +08:00
parent b1c34872bf
commit 4e2f68eb37
4 changed files with 61 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
//--------------------------------------------------------------------------------------
// File: DXUTSettingsDlg.cpp
//
// Dialog for selection of device settings
//
// Copyright (c) Microsoft Corporation. All rights reserved
//--------------------------------------------------------------------------------------
#include "dxstdafx.h"
#include "DXUTgui.h"
#include "DXUTsettingsDlg.h"
#undef min // use __min instead
#undef max // use __max instead
//--------------------------------------------------------------------------------------
// Returns the string for the given D3DDEVTYPE.
//--------------------------------------------------------------------------------------
TCHAR* DXUTD3DDeviceTypeToString(D3DDEVTYPE devType)
{
switch (devType)
{
case D3DDEVTYPE_HAL: return "D3DDEVTYPE_HA";
case D3DDEVTYPE_SW: return "D3DDEVTYPE_SW";
case D3DDEVTYPE_REF: return "D3DDEVTYPE_REF";
default: return "Unknown devType";
}
}
+15
View File
@@ -0,0 +1,15 @@
//--------------------------------------------------------------------------------------
// File: DXUTSettingsDlg.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved
//--------------------------------------------------------------------------------------
#pragma once
#ifndef DXUT_SETTINGS_H
#define DXUT_SETTINGS_H
#endif
+11
View File
@@ -32,5 +32,16 @@
#include "DXUTmisc.h"
#include "DXUTgui.h"
#include "DXUTsettingsDlg.h"
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#endif
#ifndef SAFE_DELETE_ARRAY
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#endif
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#endif
#endif // !defined(DXSDK_STDAFX_H)
+6
View File
@@ -592,6 +592,12 @@
<File
RelativePath=".\d3d9\common\DXUTmisc.h">
</File>
<File
RelativePath=".\d3d9\common\DXUTSettingsDlg.cpp">
</File>
<File
RelativePath=".\d3d9\common\DXUTSettingsDlg.h">
</File>
</Filter>
<Filter
Name="temp"