本文整理汇总了C++中ProxyHelper::LoadGUIConfig方法的典型用法代码示例。如果您正苦于以下问题:C++ ProxyHelper::LoadGUIConfig方法的具体用法?C++ ProxyHelper::LoadGUIConfig怎么用?C++ ProxyHelper::LoadGUIConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProxyHelper
的用法示例。
在下文中一共展示了ProxyHelper::LoadGUIConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProxyHelper
/**
* Create D3D device proxy.
* First it creates the device, then it loads the game configuration
* calling the ProxyHelper class. Last it creates and returns the
* device proxy calling D3DProxyDeviceFactory::Get().
***/
HRESULT WINAPI BaseDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow,DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DDevice9** ppReturnedDeviceInterface)
{
// Create real interface
HRESULT hResult = m_pD3D->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags,
pPresentationParameters, ppReturnedDeviceInterface);
if(FAILED(hResult))
return hResult;
OutputDebugString("[OK] Normal D3D device created\n");
char buf[64];
sprintf_s(buf, "Number of back buffers = %d\n", pPresentationParameters->BackBufferCount);
OutputDebugString(buf);
// load configuration file
ProxyHelper helper = ProxyHelper();
ProxyHelper::ProxyConfig cfg;
ProxyHelper::OculusProfile oculusProfile;
if(!helper.LoadConfig(cfg, oculusProfile)) {
OutputDebugString("[ERR] Config loading failed, config could not be loaded. Returning normal D3DDevice. Vireio will not be active.\n");
return hResult;
}
// load HUD/GUI settings
helper.LoadHUDConfig(cfg);
helper.LoadGUIConfig(cfg);
OutputDebugString("[OK] Config loading - OK\n");
if(cfg.stereo_mode == StereoView::DISABLED) {
OutputDebugString("[WARN] stereo_mode == disabled. Returning normal D3DDevice. Vireio will not be active.\n");
return hResult;
}
OutputDebugString("[OK] Stereo mode is enabled.\n");
char buf1[32];
LPCSTR psz = NULL;
wsprintf(buf1,"Config type: %d", cfg.game_type);
psz = buf1;
OutputDebugString(psz);
OutputDebugString("\n");
// Create and return proxy
*ppReturnedDeviceInterface = D3DProxyDeviceFactory::Get(cfg, *ppReturnedDeviceInterface, this);
OutputDebugString("[OK] Vireio D3D device created.\n");
return hResult;
}