mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Some work on changing comments, log messages, and variable and function names to reflect that the plugins are not plugins anymore.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7170 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -112,7 +112,7 @@ HRESULT LoadD3DX()
|
||||
if (hD3DXDll) return S_OK;
|
||||
|
||||
// try to load D3DX11 first to check whether we have proper runtime support
|
||||
// try to use the dll the plugin was compiled against first - don't bother about debug runtimes
|
||||
// try to use the dll the backend was compiled against first - don't bother about debug runtimes
|
||||
hD3DXDll = LoadLibraryA(StringFromFormat("d3dx11_%d.dll", D3DX11_SDK_VERSION).c_str());
|
||||
if (!hD3DXDll)
|
||||
{
|
||||
@ -243,14 +243,14 @@ HRESULT Create(HWND wnd)
|
||||
IDXGIAdapter* adapter;
|
||||
IDXGIOutput* output;
|
||||
hr = PCreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
|
||||
hr = factory->EnumAdapters(g_ActiveConfig.iAdapter, &adapter);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// try using the first one
|
||||
hr = factory->EnumAdapters(0, &adapter);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
// TODO: Make this configurable
|
||||
@ -259,7 +259,7 @@ HRESULT Create(HWND wnd)
|
||||
{
|
||||
// try using the first one
|
||||
hr = adapter->EnumOutputs(0, &output);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
// get supported AA modes
|
||||
@ -287,7 +287,7 @@ HRESULT Create(HWND wnd)
|
||||
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
mode_desc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
||||
hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
|
||||
// forcing buffer resolution to xres and yres.. TODO: The new video mode might not actually be supported!
|
||||
swap_chain_desc.BufferDesc.Width = xres;
|
||||
@ -304,7 +304,7 @@ HRESULT Create(HWND wnd)
|
||||
&featlevel, &context);
|
||||
if (FAILED(hr) || !device || !context || !swapchain)
|
||||
{
|
||||
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@ -319,7 +319,7 @@ HRESULT Create(HWND wnd)
|
||||
hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@ -431,7 +431,7 @@ void Reset()
|
||||
HRESULT hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@ -473,4 +473,4 @@ void Present()
|
||||
|
||||
} // namespace D3D
|
||||
|
||||
} // namespace DX11
|
||||
} // namespace DX11
|
||||
|
@ -81,8 +81,8 @@ inline void SetDebugObjectName(ID3D11DeviceChild* resource, const char* name)
|
||||
|
||||
// Used to not require the SDK and runtime versions to match:
|
||||
// Linking with d3dx11.lib makes the most recent d3dx11_xx.dll of the
|
||||
// compiler's SDK a requirement, but this plugin works with DX11 runtimes
|
||||
// back to August 2009 even if the plugin was built with June 2010.
|
||||
// compiler's SDK a requirement, but this backend works with DX11 runtimes
|
||||
// back to August 2009 even if the backend was built with June 2010.
|
||||
// Add any d3dx11 functions which you want to use here and load them in Create()
|
||||
typedef HRESULT (WINAPI* D3DX11COMPILEFROMMEMORYTYPE)(LPCSTR, SIZE_T, LPCSTR, const D3D10_SHADER_MACRO*, LPD3D10INCLUDE, LPCSTR, LPCSTR, UINT, UINT, ID3DX11ThreadPump*, ID3D10Blob**, ID3D10Blob**, HRESULT*);
|
||||
typedef HRESULT (WINAPI* D3DX11FILTERTEXTURETYPE)(ID3D11DeviceContext*, ID3D11Resource*, UINT, UINT);
|
||||
@ -105,4 +105,4 @@ extern CREATEDXGIFACTORY PCreateDXGIFactory;
|
||||
typedef HRESULT (WINAPI* D3D11CREATEDEVICE)(IDXGIAdapter*, D3D_DRIVER_TYPE, HMODULE, UINT, CONST D3D_FEATURE_LEVEL*, UINT, UINT, ID3D11Device**, D3D_FEATURE_LEVEL*, ID3D11DeviceContext**);
|
||||
extern D3D11CREATEDEVICE PD3D11CreateDevice;
|
||||
|
||||
} // namespace DX11
|
||||
} // namespace DX11
|
||||
|
@ -77,19 +77,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||
SetWindowTextA(EmuWindow::GetWnd(), temp);
|
||||
}
|
||||
|
||||
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
//{
|
||||
// _PluginInfo->Version = 0x0100;
|
||||
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
||||
//#ifdef DEBUGFAST
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (DebugFast)");
|
||||
//#elif defined _DEBUG
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
|
||||
//#else
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
|
||||
//#endif
|
||||
//}
|
||||
|
||||
std::string VideoBackend::GetName()
|
||||
{
|
||||
return "Direct3D11";
|
||||
@ -189,8 +176,8 @@ void VideoBackend::Initialize()
|
||||
return;
|
||||
}
|
||||
|
||||
OSD::AddMessage("Dolphin Direct3D11 Video Plugin.", 5000);
|
||||
s_PluginInitialized = true;
|
||||
OSD::AddMessage("Dolphin Direct3D11 Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
@ -225,7 +212,7 @@ void VideoBackend::Video_Prepare()
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
@ -249,7 +236,7 @@ void VideoBackend::Shutdown()
|
||||
delete g_renderer;
|
||||
EmuWindow::Close();
|
||||
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user