Browse Source

UI: Remove platform string from title bar

This cleans up the title bar text.
cg2121 2 years ago
parent
commit
a870ae2fb9
3 changed files with 14 additions and 12 deletions
  1. 10 8
      UI/obs-app.cpp
  2. 1 1
      UI/obs-app.hpp
  3. 3 3
      UI/window-basic-main.cpp

+ 10 - 8
UI/obs-app.cpp

@@ -1718,7 +1718,7 @@ bool OBSApp::OBSInit()
 	return true;
 	return true;
 }
 }
 
 
-string OBSApp::GetVersionString() const
+string OBSApp::GetVersionString(bool platform) const
 {
 {
 	stringstream ver;
 	stringstream ver;
 
 
@@ -1729,19 +1729,21 @@ string OBSApp::GetVersionString() const
 	    << LIBOBS_API_PATCH_VER;
 	    << LIBOBS_API_PATCH_VER;
 
 
 #endif
 #endif
-	ver << " (";
 
 
+	if (platform) {
+		ver << " (";
 #ifdef _WIN32
 #ifdef _WIN32
-	ver << "windows)";
+		ver << "windows)";
 #elif __APPLE__
 #elif __APPLE__
-	ver << "mac)";
+		ver << "mac)";
 #elif __OpenBSD__
 #elif __OpenBSD__
-	ver << "openbsd)";
+		ver << "openbsd)";
 #elif __FreeBSD__
 #elif __FreeBSD__
-	ver << "freebsd)";
+		ver << "freebsd)";
 #else /* assume linux for the time being */
 #else /* assume linux for the time being */
-	ver << "linux)";
+		ver << "linux)";
 #endif
 #endif
+	}
 
 
 	return ver.str();
 	return ver.str();
 }
 }
@@ -3339,7 +3341,7 @@ int main(int argc, char *argv[])
 
 
 		} else if (arg_is(argv[i], "--version", "-V")) {
 		} else if (arg_is(argv[i], "--version", "-V")) {
 			std::cout << "OBS Studio - "
 			std::cout << "OBS Studio - "
-				  << App()->GetVersionString() << "\n";
+				  << App()->GetVersionString(false) << "\n";
 			exit(0);
 			exit(0);
 		}
 		}
 	}
 	}

+ 1 - 1
UI/obs-app.hpp

@@ -174,7 +174,7 @@ public:
 
 
 	const char *GetLastCrashLog() const;
 	const char *GetLastCrashLog() const;
 
 
-	std::string GetVersionString() const;
+	std::string GetVersionString(bool platform = true) const;
 	bool IsPortableMode();
 	bool IsPortableMode();
 	bool IsUpdaterDisabled();
 	bool IsUpdaterDisabled();
 	bool IsMissingFilesCheckDisabled();
 	bool IsMissingFilesCheckDisabled();

+ 3 - 3
UI/window-basic-main.cpp

@@ -6271,8 +6271,8 @@ void OBSBasic::UploadLog(const char *subdir, const char *file, const bool crash)
 #endif
 #endif
 
 
 	stringstream ss;
 	stringstream ss;
-	ss << "OBS " << App()->GetVersionString() << " log file uploaded at "
-	   << CurrentDateTimeString() << "\n\n"
+	ss << "OBS " << App()->GetVersionString(false)
+	   << " log file uploaded at " << CurrentDateTimeString() << "\n\n"
 	   << fileString;
 	   << fileString;
 
 
 	if (logUploadThread) {
 	if (logUploadThread) {
@@ -9011,7 +9011,7 @@ void OBSBasic::UpdateTitleBar()
 	if (previewProgramMode)
 	if (previewProgramMode)
 		name << "Studio ";
 		name << "Studio ";
 
 
-	name << App()->GetVersionString();
+	name << App()->GetVersionString(false);
 	if (App()->IsPortableMode())
 	if (App()->IsPortableMode())
 		name << " - Portable Mode";
 		name << " - Portable Mode";