1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-08-29 15:36:32 -05:00

Changed app window name, logo and other references related

This commit is contained in:
JuanCStar
2024-03-06 11:19:34 +01:00
parent ed20ee50f5
commit f772e7d776
21 changed files with 107 additions and 81 deletions

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
//
@@ -9,7 +11,7 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
YUZU_ICON ICON "../../dist/yuzu.ico"
SUYU_ICON ICON "../../dist/suyu.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -17,4 +19,4 @@ YUZU_ICON ICON "../../dist/yuzu.ico"
// RT_MANIFEST
//
0 RT_MANIFEST "../../dist/yuzu.manifest"
0 RT_MANIFEST "../../dist/suyu.manifest"

View File

@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Modified by JuanCStar on 2024/03/06
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
@@ -229,8 +231,8 @@ add_executable(yuzu
vk_device_info.h
compatdb.cpp
compatdb.h
yuzu.qrc
yuzu.rc
suyu.qrc
suyu.rc
)
if (YUZU_CRASH_DUMPS)

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include <QIcon>
#include <fmt/format.h>
#include "common/scm_rev.h"
@@ -13,19 +15,19 @@ AboutDialog::AboutDialog(QWidget* parent)
const auto description = std::string(Common::g_scm_desc);
const auto build_id = std::string(Common::g_build_id);
const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description);
const auto suyu_build = fmt::format("suyu Development Build | {}-{}", branch_name, description);
const auto override_build =
fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);
const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build;
const auto suyu_build_version = override_build.empty() ? suyu_build : override_build;
ui->setupUi(this);
// Try and request the icon from Qt theme (Linux?)
const QIcon yuzu_logo = QIcon::fromTheme(QStringLiteral("org.yuzu_emu.yuzu"));
if (!yuzu_logo.isNull()) {
ui->labelLogo->setPixmap(yuzu_logo.pixmap(200));
const QIcon suyu_logo = QIcon::fromTheme(QStringLiteral("org.suyu_emu.suyu"));
if (!suyu_logo.isNull()) {
ui->labelLogo->setPixmap(suyu_logo.pixmap(200));
}
ui->labelBuildInfo->setText(
ui->labelBuildInfo->text().arg(QString::fromStdString(yuzu_build_version),
ui->labelBuildInfo->text().arg(QString::fromStdString(suyu_build_version),
QString::fromUtf8(Common::g_build_date).left(10)));
}

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#pragma once
#include <memory>

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include <cinttypes>
#include <clocale>
#include <cmath>
@@ -4551,10 +4553,10 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
const auto description = std::string(Common::g_scm_desc);
const auto build_id = std::string(Common::g_build_id);
const auto yuzu_title = fmt::format("yuzu | {}-{}", branch_name, description);
const auto suyu_title = fmt::format("suyu | {}-{}", branch_name, description);
const auto override_title =
fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);
const auto window_title = override_title.empty() ? yuzu_title : override_title;
const auto window_title = override_title.empty() ? suyu_title : override_title;
if (title_name.empty()) {
setWindowTitle(QString::fromStdString(window_title));
@@ -5303,7 +5305,7 @@ int main(int argc, char* argv[]) {
// Fix the Wayland appId. This needs to match the name of the .desktop file without the .desktop
// suffix.
QGuiApplication::setDesktopFileName(QStringLiteral("org.yuzu_emu.yuzu"));
QGuiApplication::setDesktopFileName(QStringLiteral("org.suyu_emu.suyu"));
#endif
SetHighDPIAttributes();

View File

@@ -11,11 +11,11 @@
</rect>
</property>
<property name="windowTitle">
<string>yuzu</string>
<string>suyu</string>
</property>
<property name="windowIcon">
<iconset resource="yuzu.qrc">
<normaloff>:/img/yuzu.ico</normaloff>:/img/yuzu.ico</iconset>
<iconset resource="suyu.qrc">
<normaloff>:/img/suyu.ico</normaloff>:/img/suyu.ico</iconset>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
@@ -477,7 +477,7 @@
</action>
</widget>
<resources>
<include location="yuzu.qrc"/>
<include location="suyu.qrc"/>
</resources>
<connections/>
</ui>

12
src/yuzu/suyu.qrc Normal file
View File

@@ -0,0 +1,12 @@
<!--
SPDX-FileCopyrightText: 2024 suyu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later
Modified by JuanCStar on 2024/03/06
-->
<RCC>
<qresource prefix="/img">
<file alias="suyu.ico">../../dist/suyu.ico</file>
</qresource>
</RCC>

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
//
@@ -11,7 +13,7 @@
// remains consistent on all systems.
// QT requires that the default application icon is named IDI_ICON1
IDI_ICON1 ICON "../../dist/yuzu.ico"
IDI_ICON1 ICON "../../dist/suyu.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -19,4 +21,4 @@ IDI_ICON1 ICON "../../dist/yuzu.ico"
// RT_MANIFEST
//
0 RT_MANIFEST "../../dist/yuzu.manifest"
0 RT_MANIFEST "../../dist/suyu.manifest"

View File

@@ -1,10 +0,0 @@
<!--
SPDX-FileCopyrightText: 2021 yuzu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later
-->
<RCC>
<qresource prefix="/img">
<file alias="yuzu.ico">../../dist/yuzu.ico</file>
</qresource>
</RCC>

View File

@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Modified by JuanCStar on 2024/03/06
# Credits to Samantas5855 and others for this function.
function(create_resource file output filename)
# Read hex data from file
@@ -25,7 +27,7 @@ add_executable(yuzu-cmd
sdl_config.cpp
sdl_config.h
yuzu.cpp
yuzu.rc
suyu.rc
)
target_link_libraries(yuzu-cmd PRIVATE common core input_common frontend_common)

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
//
@@ -9,7 +11,7 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
YUZU_ICON ICON "../../dist/yuzu.ico"
SUYU_ICON ICON "../../dist/suyu.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -17,4 +19,4 @@ YUZU_ICON ICON "../../dist/yuzu.ico"
// RT_MANIFEST
//
0 RT_MANIFEST "../../dist/yuzu.manifest"
0 RT_MANIFEST "../../dist/suyu.manifest"