OSDN Git Service

Boost.MSMでメニュー部分を実装
[shooting3/shootinggame.git] / ShootingGame / DirectXSample.h
1 //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
2 //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3 //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
4 //// PARTICULAR PURPOSE.
5 ////
6 //// Copyright (c) Microsoft Corporation. All rights reserved
7
8 #pragma once
9
10 // Helper utilities to make DX APIs work with exceptions in the samples apps.
11 namespace DX
12 {
13     inline void ThrowIfFailed(HRESULT hr)
14     {
15         if (FAILED(hr))
16         {
17             // Set a breakpoint on this line to catch DX API errors.
18             throw Platform::Exception::CreateException(hr);
19         }
20     }
21 }