Added: D3D9 project and window creation
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#include <string>
|
||||
|
||||
void ShowError(UINT error);
|
||||
|
||||
#define CheckError(x) if (x != 0) \
|
||||
{ \
|
||||
ShowError(x); \
|
||||
return x; \
|
||||
}
|
||||
|
||||
#define CheckFailed(hr, x) if (FAILED(hr)) \
|
||||
{ \
|
||||
ShowError(x); \
|
||||
return x; \
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void safeRelease(T*& obj)
|
||||
{
|
||||
if (obj != nullptr)
|
||||
{
|
||||
obj->Release();
|
||||
obj = nullptr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user