Only set window title if standalone

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-01-03 23:53:27 +00:00
parent b94762a695
commit 1497e54974
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -623,16 +623,18 @@ void Window::step() {
bndSetFont(uiFont->handle); bndSetFont(uiFont->handle);
// Set window title // Set window title
std::string windowTitle = "Cardinal"; if (isStandalone()) {
if (APP->patch->path != "") { std::string windowTitle = "Cardinal";
windowTitle += " - "; if (APP->patch->path != "") {
if (!APP->history->isSaved()) windowTitle += " - ";
windowTitle += "*"; if (!APP->history->isSaved())
windowTitle += system::getFilename(APP->patch->path); windowTitle += "*";
} windowTitle += system::getFilename(APP->patch->path);
if (windowTitle != internal->lastWindowTitle) { }
internal->tlw->getWindow().setTitle(windowTitle.c_str()); if (windowTitle != internal->lastWindowTitle) {
internal->lastWindowTitle = windowTitle; internal->tlw->getWindow().setTitle(windowTitle.c_str());
internal->lastWindowTitle = windowTitle;
}
} }
// Get desired pixel ratio // Get desired pixel ratio