-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
192 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,10 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include "plDXVertexShader.h" | ||
#include "plDXPixelShader.h" | ||
|
||
#include <string_theory/string> | ||
|
||
//// Macros for D3D error handling | ||
#define INIT_ERROR_CHECK( cond, errMsg ) if( FAILED( fPipeline->fSettings.fDXError = cond ) ) { return fPipeline->ICreateFail( errMsg ); } | ||
#define INIT_ERROR_CHECK(cond, errMsg) if (FAILED(fSettings.fDXError = cond)) { return ICreateFail(ST_LITERAL(errMsg)); } | ||
|
||
#if 1 // DEBUG | ||
#define STRONG_ERROR_CHECK( cond ) if( FAILED( fPipeline->fSettings.fDXError = cond ) ) { fPipeline->IGetD3DError(); fPipeline->IShowErrorMessage(); } | ||
|
@@ -189,7 +191,7 @@ void plDXDevice::SetLocalToWorldMatrix(const hsMatrix44& src) | |
fD3DDevice->SetTransform(D3DTS_WORLD, &mat); | ||
} | ||
|
||
const char* plDXDevice::GetErrorString() const | ||
ST::string plDXDevice::GetErrorString() const | ||
{ | ||
return fPipeline->fSettings.fErrorStr; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#ifndef hsGDirect3DTnLEnumerate_h | ||
#define hsGDirect3DTnLEnumerate_h | ||
|
||
#include <string_theory/string> | ||
#include <vector> | ||
|
||
#include "HeadSpin.h" | ||
|
@@ -60,9 +61,9 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
struct D3DEnum_ModeInfo | ||
{ | ||
D3DDISPLAYMODE fDDmode; | ||
CHAR fStrDesc[40]; | ||
ST::string fStrDesc; | ||
BOOL fWindowed; | ||
char fBitDepth; | ||
uint8_t fBitDepth; | ||
DWORD fDDBehavior; | ||
std::vector<D3DFORMAT> fDepthFormats; | ||
std::vector<D3DMULTISAMPLE_TYPE> fFSAATypes; | ||
|
@@ -82,7 +83,7 @@ struct D3DEnum_ModeInfo | |
struct D3DEnum_DeviceInfo | ||
{ | ||
D3DDEVTYPE fDDType; | ||
CHAR fStrName[40]; | ||
ST::string fStrName; | ||
D3DCAPS9 fDDCaps; | ||
BOOL fCanWindow; | ||
BOOL fCompatibleWithDesktop; | ||
|
@@ -110,8 +111,8 @@ struct D3DEnum_DriverInfo | |
{ | ||
GUID fGuid; | ||
|
||
CHAR fStrDesc[40]; | ||
CHAR fStrName[40]; | ||
ST::string fStrDesc; | ||
ST::string fStrName; | ||
|
||
unsigned int fMemory; | ||
|
||
|
@@ -136,7 +137,7 @@ class hsG3DDeviceMode; | |
class hsGDirect3DTnLEnumerate | ||
{ | ||
protected: | ||
char fEnumeErrorStr[128]; // Driver & device enumeration error message buffer | ||
ST::string fEnumeErrorStr; // Driver & device enumeration error message buffer | ||
|
||
std::vector<D3DEnum_DriverInfo> fDrivers; | ||
|
||
|
@@ -160,8 +161,6 @@ class hsGDirect3DTnLEnumerate | |
|
||
VOID D3DEnum_FreeResources(); | ||
|
||
char* GetErrorString() { return (fEnumeErrorStr[0] ? fEnumeErrorStr : nullptr); } | ||
|
||
bool SelectFromDevMode(const hsG3DDeviceRecord* devRec, const hsG3DDeviceMode* devMode); | ||
HRESULT D3DEnum_SelectDefaultMode(int width, int height, int depth); | ||
HRESULT D3DEnum_SelectDefaultDriver( DWORD dwFlags ); | ||
|
@@ -177,8 +176,7 @@ class hsGDirect3DTnLEnumerate | |
void SetCurrentDevice(D3DEnum_DeviceInfo* d) { hsAssert(GetCurrentDriver(), "Set Driver first"); GetCurrentDriver()->fCurrentDevice = d; } | ||
void SetCurrentMode(D3DEnum_ModeInfo* m) { hsAssert(GetCurrentDriver(), "Set Driver first"); GetCurrentDriver()->fCurrentMode = m; } | ||
|
||
char* GetEnumeErrorStr() { return fEnumeErrorStr; } | ||
void SetEnumeErrorStr(const char* s); | ||
ST::string GetEnumeErrorStr() { return fEnumeErrorStr; } | ||
}; | ||
|
||
|
||
|
Oops, something went wrong.