From c3fe549d4d893ec041ac4d44cab98c75f506b4e1 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Mon, 28 Sep 2009 08:08:16 +0000 Subject: [PATCH] Place the OpenGL info strings into their own block. OS X reports these as completely different strings it was co-incidence that the actual vendor/card info is there on FreeBSD/Linux. It's likely other operating systems (eg. Windows) does the same thing as OS X. Eventually I'll re-add vendor information for the actual card once I figure out a way to get it on BSD/OS X. Originally committed to SVN as r3601. --- aegisub/reporter/include/platform.h | 24 ++++++++++++------------ aegisub/reporter/name_map.cpp | 1 + aegisub/reporter/platform.cpp | 8 ++++---- aegisub/reporter/report.cpp | 16 ++++++++++------ 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/aegisub/reporter/include/platform.h b/aegisub/reporter/include/platform.h index c1235de7d..153635349 100644 --- a/aegisub/reporter/include/platform.h +++ b/aegisub/reporter/include/platform.h @@ -178,25 +178,25 @@ public: /// @retval Integer in bytes virtual wxString Memory()=0; - /// Video card - /// @return Video card vendor + /// OpenGL vendor + /// @return Vendor /// @retval Any - virtual wxString VideoVendor(); + virtual wxString OpenGLVendor(); - /// Video card renderer - /// @return Video card renderer name + /// OpenGL renderer + /// @return Renderer /// @retval Any - virtual wxString VideoRenderer(); + virtual wxString OpenGLRenderer(); - /// Video card version - /// @return Video card renderer version + /// OpenGL version + /// @return Renderer version /// @retval Any - virtual wxString VideoVersion(); + virtual wxString OpenGLVersion(); - /// Video card OpenGL extensions - /// @return List of extensions + /// OpenGL extensions + /// @return OpenGL extensions /// @retval Space delimited list of extensions - virtual wxString VideoExt(); + virtual wxString OpenGLExt(); //@} /// @name Windows diff --git a/aegisub/reporter/name_map.cpp b/aegisub/reporter/name_map.cpp index cf8f4ea6a..166899c7c 100644 --- a/aegisub/reporter/name_map.cpp +++ b/aegisub/reporter/name_map.cpp @@ -60,6 +60,7 @@ const Report::nameMap Report::HumanNames() { nMap.insert(nPair("medusakeys", _TT("Medusa Hotkeys Enabled"))); nMap.insert(nPair("memory", _TT("Memory"))); nMap.insert(nPair("model", _TT("Model"))); + nMap.insert(nPair("opengl", _TT("OpenGL"))); nMap.insert(nPair("osendian", _TT("Endian"))); nMap.insert(nPair("osfamily", _TT("OS Family"))); nMap.insert(nPair("osname", _TT("OS Name"))); diff --git a/aegisub/reporter/platform.cpp b/aegisub/reporter/platform.cpp index 1e53ac9e9..18e2bf736 100644 --- a/aegisub/reporter/platform.cpp +++ b/aegisub/reporter/platform.cpp @@ -164,19 +164,19 @@ wxString Platform::DesktopEnvironment() { return ""; } -wxString Platform::VideoVendor() { +wxString Platform::OpenGLVendor() { return GetVideoInfo(VIDEO_VENDOR); } -wxString Platform::VideoRenderer() { +wxString Platform::OpenGLRenderer() { return GetVideoInfo(VIDEO_RENDERER); } -wxString Platform::VideoVersion() { +wxString Platform::OpenGLVersion() { return GetVideoInfo(VIDEO_VERSION); } -wxString Platform::VideoExt() { +wxString Platform::OpenGLExt() { return GetVideoInfo(VIDEO_EXT); } diff --git a/aegisub/reporter/report.cpp b/aegisub/reporter/report.cpp index 0cd6dfae8..2efe5da3e 100644 --- a/aegisub/reporter/report.cpp +++ b/aegisub/reporter/report.cpp @@ -92,15 +92,19 @@ Report::XMLReport Report::ReportCreate() { wxXmlNode *display = new wxXmlNode(wxXML_ELEMENT_NODE, "display"); doc.hardware->AddChild(display); - Add(display, "vendor", p->VideoVendor()); - Add(display, "renderer", p->VideoRenderer()); - Add(display, "version", p->VideoVersion()); - Add(display, "extensions", p->VideoExt()); Add(display, "depth", p->DisplayDepth()); Add(display, "colour", p->DisplayColour()); Add(display, "size", p->DisplaySize()); Add(display, "ppi", p->DisplayPPI()); + wxXmlNode *display_gl = new wxXmlNode(wxXML_ELEMENT_NODE, "opengl"); + display->AddChild(display_gl); + + Add(display_gl, "vendor", p->OpenGLVendor()); + Add(display_gl, "renderer", p->OpenGLRenderer()); + Add(display_gl, "version", p->OpenGLVersion()); + Add(display_gl, "extensions", p->OpenGLExt()); + #ifdef __WINDOWS__ doc.windows = new wxXmlNode(wxXML_ELEMENT_NODE, "windows"); doc.report->AddChild(doc.windows); @@ -168,8 +172,8 @@ void Report::ProcessNode(wxXmlNode *node, wxString *text, wxListView *listView) int depth = child->GetDepth(); if (child->GetChildren()->GetType() == wxXML_ELEMENT_NODE) { - int font_size = 15 - (round(depth * 2.5)); - int bgcolour = 185 + (depth * 25); + int font_size = 15 - (round(depth * 2)); + int bgcolour = 155 + (depth * 20); listView->InsertItem(row,node_name); listView->SetItemFont(row, wxFont(font_size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); listView->SetItemBackgroundColour(row, wxColour(bgcolour,bgcolour,bgcolour, wxALPHA_OPAQUE));