mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-13 11:27:42 +01:00
Merge pull request #2614 from reiichi001/add_gpu_to_crashinfo
Add GPU Info to Crash Handler
This commit is contained in:
commit
990c4fd7e8
1 changed files with 36 additions and 0 deletions
|
|
@ -28,6 +28,9 @@
|
|||
#include <ShObjIdl.h>
|
||||
#include <shlobj_core.h>
|
||||
|
||||
#include <dxgi.h>
|
||||
#pragma comment(lib, "dxgi.lib")
|
||||
|
||||
#pragma comment(lib, "comctl32.lib")
|
||||
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
|
||||
|
|
@ -470,6 +473,32 @@ void open_folder_and_select_items(HWND hwndOpener, const std::wstring& path) {
|
|||
ILFree(piid);
|
||||
}
|
||||
|
||||
std::vector<IDXGIAdapter1*> enum_dxgi_adapters()
|
||||
{
|
||||
std::vector<IDXGIAdapter1*> vAdapters;
|
||||
|
||||
IDXGIFactory1* pFactory = NULL;
|
||||
if (FAILED(CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&pFactory)))
|
||||
{
|
||||
return vAdapters;
|
||||
}
|
||||
|
||||
IDXGIAdapter1* pAdapter;
|
||||
for (UINT i = 0;
|
||||
pFactory->EnumAdapters1(i, &pAdapter) != DXGI_ERROR_NOT_FOUND;
|
||||
++i)
|
||||
{
|
||||
vAdapters.push_back(pAdapter);
|
||||
}
|
||||
|
||||
if (pFactory)
|
||||
{
|
||||
pFactory->Release();
|
||||
}
|
||||
|
||||
return vAdapters;
|
||||
}
|
||||
|
||||
void export_tspack(HWND hWndParent, const std::filesystem::path& logDir, const std::string& crashLog, const std::string& troubleshootingPackData) {
|
||||
static const char* SourceLogFiles[] = {
|
||||
"output.log", // XIVLauncher for Windows
|
||||
|
|
@ -1023,6 +1052,13 @@ int main() {
|
|||
log << std::format(L"System Time: {0:%F} {0:%T} {0:%Ez}", std::chrono::system_clock::now()) << std::endl;
|
||||
log << std::format(L"CPU Vendor: {}", vendor) << std::endl;
|
||||
log << std::format(L"CPU Brand: {}", brand) << std::endl;
|
||||
|
||||
for (IDXGIAdapter1* adapter : enum_dxgi_adapters()) {
|
||||
DXGI_ADAPTER_DESC1 adapterDescription{};
|
||||
adapter->GetDesc1(&adapterDescription);
|
||||
log << std::format(L"GPU Desc: {}", adapterDescription.Description) << std::endl;
|
||||
}
|
||||
|
||||
log << L"\n" << stackTrace << std::endl;
|
||||
|
||||
if (pProgressDialog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue