From d8b2b2b92b46ade6815f2bd12bf0c057973fa095 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 18 May 2024 22:35:26 +0800 Subject: [PATCH] [saco] Implement `DXUTPresentIntervalToString(...)` --- saco/d3d9/common/DXUTSettingsDlg.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/saco/d3d9/common/DXUTSettingsDlg.cpp b/saco/d3d9/common/DXUTSettingsDlg.cpp index a43f972..739277b 100644 --- a/saco/d3d9/common/DXUTSettingsDlg.cpp +++ b/saco/d3d9/common/DXUTSettingsDlg.cpp @@ -72,3 +72,21 @@ TCHAR* DXUTVertexProcessingTypeToString(DWORD vpt) } +//-------------------------------------------------------------------------------------- +// Returns the string for the given present interval. +//-------------------------------------------------------------------------------------- +TCHAR* DXUTPresentIntervalToString( UINT pi ) +{ + switch( pi ) + { + case D3DPRESENT_INTERVAL_IMMEDIATE: return "D3DPRESENT_INTERVAL_IMMEDIATE"; + case D3DPRESENT_INTERVAL_DEFAULT: return "D3DPRESENT_INTERVAL_DEFAULT"; + case D3DPRESENT_INTERVAL_ONE: return "D3DPRESENT_INTERVAL_ONE"; + case D3DPRESENT_INTERVAL_TWO: return "D3DPRESENT_INTERVAL_TWO"; + case D3DPRESENT_INTERVAL_THREE: return "D3DPRESENT_INTERVAL_THREE"; + case D3DPRESENT_INTERVAL_FOUR: return "D3DPRESENT_INTERVAL_FOUR"; + default: return "Unknown PresentInterval"; + } +} + +