1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-12-08 13:52:08 -06:00

34 Commits

Author SHA1 Message Date
ddutchie
85f94fbc08 Merge branch 'dev' into ddutchie/uitweaks 2024-03-19 16:29:06 -04:00
ddutchie
fec573fd6a Add Android Tag 2024-03-19 16:25:13 -04:00
JuanCStar
d0afa9b1ad fix: update web service urls 2024-03-19 20:21:09 +01:00
ddutchie
86829beb9d Update Docker Script 2024-03-19 14:17:39 -04:00
ddutchie
e3ad2bd629 Tag 2024-03-19 14:08:44 -04:00
ddutchie
c6031e8a9a Merge branch 'dev' into ddutchie/uitweaks 2024-03-19 14:06:51 -04:00
drHyperion451
3e7c0343bd Error handling for the icns generator script 2024-03-19 15:58:16 +00:00
ddutchie
3619f350a1 Merge branch 'dev' into ddutchie/uitweaks 2024-03-19 08:21:35 -04:00
Alessio
460b6be75f Radeon gpu profiler detection support 2024-03-18 23:23:57 +00:00
Exverge
93dc7fb6b2 fix: Fixes compiling to non-Apple OSes on arm64 2024-03-18 23:11:32 +00:00
Levi Akatsuki
e0ff7d0a6e Fixed broken code in dev branch 2024-03-18 22:13:59 +00:00
Paulo Alfaiate
fb326514bf Update 2024-03-18 20:43:04 +00:00
ddutchie
c6feb95d8d Update main.cpp 2024-03-18 15:27:32 -04:00
ddutchie
5b0136dafe Merge branch 'dev' into ddutchie/uitweaks 2024-03-18 08:00:03 -04:00
ddutchie
69cc6e9b6e Add color 2024-03-18 07:59:51 -04:00
ddutchie
9d9a57a85a Add method to main.h 2024-03-17 18:02:11 -04:00
ddutchie
28ecb35260 Clang Format 2024-03-17 16:05:05 -04:00
ddutchie
91e22ebd81 Pop of Color, Add 800p 2024-03-17 16:00:02 -04:00
ddutchie
71d26161c1 Merge branch 'dev' into ddutchie/uitweaks 2024-03-17 15:52:20 -04:00
ddutchie
d6d0505f1b Update loading_screen.cpp 2024-03-17 06:30:42 -04:00
ddutchie
ac4c2702d7 Loader 2024-03-16 22:08:42 -04:00
ddutchie
c5cbb74628 Merge branch 'dev' into ddutchie/uitweaks 2024-03-16 22:07:54 -04:00
ddutchie
f43f50c1c5 Update loading_screen.cpp 2024-03-16 21:43:14 -04:00
ddutchie
b96fcd1370 Cleanup 2024-03-16 20:40:51 -04:00
ddutchie
5cd903eabd Revert "Add Logo"
This reverts commit 8e08fc1ab9.
2024-03-16 20:35:27 -04:00
ddutchie
59e997ee07 Revert "Rework Add new Logos"
This reverts commit 6737a54cdb.
2024-03-16 20:35:22 -04:00
ddutchie
6737a54cdb Rework Add new Logos 2024-03-16 18:43:51 -04:00
ddutchie
8e08fc1ab9 Add Logo 2024-03-16 18:20:42 -04:00
ddutchie
2786311869 Update loading_screen.ui 2024-03-16 16:58:40 -04:00
ddutchie
8ff94c9191 Fix 2024-03-16 14:03:19 -04:00
ddutchie
6f85fbc9d4 Tweak Radius, Medium Font 2024-03-16 13:44:05 -04:00
ddutchie
6a5d65cc17 Hide logos change font 2024-03-16 13:14:11 -04:00
ddutchie
a2d7dc61f0 Merge branch 'dev' into ddutchie/uitweaks 2024-03-16 12:45:08 -04:00
ddutchie
859ad39852 First Pass Loading Screen 2024-03-16 12:44:28 -04:00
16 changed files with 148 additions and 102 deletions

View File

@@ -12,8 +12,6 @@ mkdir build || true && cd build
cmake .. \
-DBoost_USE_STATIC_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
@@ -26,7 +24,6 @@ cmake .. \
-DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_ENABLE_LTO=ON \
-DSUYU_CRASH_DUMPS=ON \
-DSUYU_USE_FASTER_LD=ON \
-GNinja
ninja

View File

@@ -1,22 +1,6 @@
stages:
- format
- build
variables:
# https://docs.gitlab.com/ee/ci/runners/configure_runners.html
TRANSFER_METER_FREQUENCY: "2s"
ARTIFACT_COMPRESSION_LEVEL: "fast"
CACHE_COMPRESSION_LEVEL: "fastest"
CACHE_REQUEST_TIMEOUT: 5
# Use FASTZIP for faster compression in cache and artifacts
# https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
FF_USE_FASTZIP: true
# Our Variables
CACHE_DIR: "$CI_PROJECT_DIR/ccache"
CCACHE_DIR: $CACHE_DIR
#CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
clang-format:
stage: format
@@ -32,20 +16,11 @@ clang-format:
# - Windows
- Parallelized
- Format
#LINUX BUILD - BUILDS LINUX APPIMAGE
build-linux:
stage: build
image: suyuemu/cibuild:linux-x64
resource_group: linux-ci
cache:
key: "$CI_COMMIT_REF_NAME-ccache"
paths:
- $CACHE_DIR
before_script:
- mkdir -p $CACHE_DIR
- chmod -R 777 $CACHE_DIR
- ls -la $CACHE_DIR
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_DEPTH: 1
@@ -59,7 +34,6 @@ build-linux:
tags:
- Linux
- Parallelized
#ANDROID BUILD - BUILDS APK
android:
stage: build
@@ -78,6 +52,5 @@ android:
paths:
- artifacts/*
tags:
- Linux
- Android
- Parallelized

View File

@@ -1,14 +1,72 @@
mkdir suyu.iconset
convert -background none -resize 16x16 suyu.svg suyu.iconset/icon_16x16.png;
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_16x16@2x.png;
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_32x32.png;
convert -background none -resize 64x64 suyu.svg suyu.iconset/icon_32x32@2x.png;
convert -background none -resize 128x128 suyu.svg suyu.iconset/icon_128x128.png;
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_256x256.png;
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_128x128@2x.png;
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_256x256@2x.png;
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_512x512.png;
convert -background none -resize 1024x1024 suyu.svg suyu.iconset/icon_512x512@2x.png;
#!/bin/bash
# icns_generator.sh GNU GPLv3 License
# Run this script when a new logo is made and the svg file inside.
# You should install Imagemagick to make the conversions: $brew install imagemagick
iconutil -c icns suyu.iconset
rm -rf suyu.iconset
# Change working dir to where this script is located.
cd "${0%/*}"
if [ -z $1 ]; then
echo "icns_generator.sh GNU GPLv3 License"
echo "Run this script when a new logo is made and the svg file inside."
echo ""
echo "Syntax: ./icns_generator <input.svg>"
echo ""
echo "Don't forget to install imagemagick: "
echo "$ brew install imagemagick"
exit 0
fi
# Error Handling Stuff:
## Check command availability
check_command() {
if ! command -v "$1" &> /dev/null; then
read -s -n 1 -p "Error: '$1' command not found. Please install $2."
exit 1
fi
}
## Convert image with error handling
convert_image() {
convert -background none -resize "$2" "$1" "$3" || {
read -s -n 1 -p "Error: Conversion failed for $1"
exit 1
}
}
# Check required commands
check_command "convert" "ImageMagick"
check_command "iconutil" "macOS"
# Create the iconset directory
mkdir suyu.iconset || {
read -s -n 1 -p "Error: Unable to create suyu.iconset directory."
exit 1
}
# Convert images
convert_image "$1" 16x16 suyu.iconset/icon_16x16.png
convert_image "$1" 32x32 suyu.iconset/icon_16x16@2x.png
convert_image "$1" 32x32 suyu.iconset/icon_32x32.png
convert_image "$1" 64x64 suyu.iconset/icon_32x32@2x.png
convert_image "$1" 128x128 suyu.iconset/icon_128x128.png
convert_image "$1" 256x256 suyu.iconset/icon_256x256.png
convert_image "$1" 256x256 suyu.iconset/icon_128x128@2x.png
convert_image "$1" 512x512 suyu.iconset/icon_256x256@2x.png
convert_image "$1" 512x512 suyu.iconset/icon_512x512.png
convert_image "$1" 1024x1024 suyu.iconset/icon_512x512@2x.png
# Create the ICNS file
iconutil -c icns suyu.iconset || {
read -s -n 1 -p "Error: Failed to create ICNS file."
exit 1
}
# Remove the temporary iconset directory
rm -rf suyu.iconset || {
read -s -n 1 -p "Error: Unable to remove suyu.iconset directory."
exit 1
}
echo -s -n 1 -p "Icon generation completed successfully."
echo ""

View File

@@ -611,7 +611,7 @@ struct Values {
Category::Network};
// WebService
Setting<std::string> web_api_url{linkage, "http://74.113.97.71:3000", "web_api_url",
Setting<std::string> web_api_url{linkage, "https://suyu.dev", "web_api_url",
Category::WebService};
Setting<std::string> suyu_username{linkage, std::string(), "suyu_username",
Category::WebService};

View File

@@ -11,6 +11,8 @@
#include <dynarmic/frontend/A64/decoder/a64.h>
#include <dynarmic/frontend/imm.h>
#include "common/common_types.h"
#pragma GCC diagnostic pop
namespace Core {

View File

@@ -648,14 +648,14 @@ void KeyManager::ReloadKeys() {
if (Settings::values.use_dev_keys) {
dev_mode = true;
LoadFromFile(suyu_keys_dir / "dev.keys", 1);
LoadFromFile(suyu_keys_dir / "dev.keys", false);
} else {
dev_mode = false;
LoadFromFile(suyu_keys_dir / "prod.keys", 2);
LoadFromFile(suyu_keys_dir / "prod.keys", false);
}
LoadFromFile(suyu_keys_dir / "title.keys", 3);
LoadFromFile(suyu_keys_dir / "console.keys", 4);
LoadFromFile(suyu_keys_dir / "title.keys", true);
LoadFromFile(suyu_keys_dir / "console.keys", false);
}
static bool ValidCryptoRevisionString(std::string_view base, size_t begin, size_t length) {
@@ -666,26 +666,11 @@ static bool ValidCryptoRevisionString(std::string_view base, size_t begin, size_
[](u8 c) { return std::isxdigit(c); });
}
void KeyManager::LoadFromFile(const std::filesystem::path& file_path, int key_type) {
void KeyManager::LoadFromFile(const std::filesystem::path& file_path, bool is_title_keys) {
if (!Common::FS::Exists(file_path)) {
switch (key_type) {
case 1:
LOG_ERROR(Crypto, "Issue with Development key file at '{}': File not found",
file_path.generic_string());
return;
case 2:
LOG_ERROR(Crypto, "Issue with Production key file at '{}': File not found",
file_path.generic_string());
return;
case 3:
LOG_INFO(Crypto, "Issue with Title key file at '{}': File not found",
file_path.generic_string());
case 4:
LOG_INFO(Crypto, "Issue with Console key file at '{}': File not found",
file_path.generic_string());
default:
LOG_ERROR(Crypto, "Unknown Key Type");
}
LOG_ERROR(Crypto, "Cannot handle key file '{}': File not found",
file_path.generic_string());
return;
}
std::ifstream file;
@@ -818,8 +803,7 @@ bool KeyManager::BaseDeriveNecessary() const {
}
if (!Common::FS::Exists(suyu_keys_dir / "title.keys")) {
LOG_ERROR(Crypto, "No title.keys found");
return true;
LOG_WARNING(Crypto, "Could not locate a title.keys file");
}
if (check_key_existence(S256KeyType::Header)) {
@@ -1322,4 +1306,4 @@ bool KeyManager::AddTicket(const Ticket& ticket) {
SetKey(S128KeyType::Titlekey, key.value(), rights_id[1], rights_id[0]);
return true;
}
} // namespace Core::Crypto
} // namespace Core::Crypto

View File

@@ -312,7 +312,7 @@ private:
RSAKeyPair<2048> eticket_rsa_keypair{};
bool dev_mode;
void LoadFromFile(const std::filesystem::path& file_path, int key_type);
void LoadFromFile(const std::filesystem::path& file_path, bool is_title_keys);
void DeriveGeneralPurposeKeys(std::size_t crypto_revision);

View File

@@ -63,11 +63,11 @@ void ConfigureWeb::RetranslateUI() {
ui->retranslateUi(this);
ui->web_signup_link->setText(
tr("<a href='https://profile.suyu.dev/'><span style=\"text-decoration: underline; "
tr("<a href='https://suyu.dev/signup'><span style=\"text-decoration: underline; "
"color:#039be5;\">Sign up</span></a>"));
ui->web_token_info_link->setText(
tr("<a href='https://suyu.dev/wiki/suyu-web-service/'><span style=\"text-decoration: "
tr("<a href='https://suyu.dev/account'><span style=\"text-decoration: "
"underline; color:#039be5;\">What is my token?</span></a>"));
}

View File

@@ -31,23 +31,22 @@ constexpr char PROGRESSBAR_STYLE_BUILD[] = R"(
QProgressBar {
background-color: black;
border: 2px solid white;
border-radius: 4px;
border-radius: 10px;
padding: 2px;
}
QProgressBar::chunk {
background-color: #ff3c28;
width: 1px;
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(98, 160, 234, 255), stop:1 rgba(237, 51, 59, 255));
border-radius: 6px;
})";
constexpr char PROGRESSBAR_STYLE_COMPLETE[] = R"(
QProgressBar {
background-color: #0ab9e6;
background-color: black;
border: 2px solid white;
border-radius: 4px;
padding: 2px;
border-radius: 10px;
padding: 4px;
}
QProgressBar::chunk {
background-color: #ff3c28;
})";
LoadingScreen::LoadingScreen(QWidget* parent)
@@ -99,7 +98,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
#ifdef SUYU_QT_MOVIE_MISSING
QPixmap map;
map.loadFromData(buffer.data(), buffer.size());
ui->banner->setPixmap(map);
setPixmap(map);
#else
backing_mem = std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()),
static_cast<int>(buffer.size()));
@@ -116,6 +115,8 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
map.loadFromData(buffer.data(), static_cast<uint>(buffer.size()));
ui->logo->setPixmap(map);
}
ui->logo->setVisible(false);
ui->banner->setVisible(false);
slow_shader_compile_start = false;
OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);

View File

@@ -49,6 +49,9 @@
</property>
<item alignment="Qt::AlignLeft|Qt::AlignTop">
<widget class="QLabel" name="logo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
@@ -78,7 +81,7 @@
</property>
<property name="styleSheet">
<string notr="true">background-color: black; color: white;
font: 75 20pt &quot;Arial&quot;;</string>
font: 500 20pt &quot;Ubuntu&quot;;</string>
</property>
<property name="text">
<string>Loading Shaders 387 / 1628</string>
@@ -96,19 +99,25 @@ font: 75 20pt &quot;Arial&quot;;</string>
<property name="minimumSize">
<size>
<width>500</width>
<height>40</height>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QProgressBar {
color: white;
background-color: black;
border: 2px solid white;
outline-color: black;
border-radius: 20px;
border-radius: 10px;
padding: 2px;
}
QProgressBar::chunk {
background-color: white;
border-radius: 15px;
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(98, 160, 234, 255), stop:1 rgba(237, 51, 59, 255));
border-radius: 6px;
}</string>
</property>
<property name="value">
@@ -129,7 +138,7 @@ border-radius: 15px;
</property>
<property name="styleSheet">
<string notr="true">background-color: black; color: white;
font: 75 15pt &quot;Arial&quot;;</string>
font: 500 15pt &quot;Ubuntu&quot;;</string>
</property>
<property name="text">
<string>Estimated Time 5m 4s</string>
@@ -140,6 +149,9 @@ font: 75 15pt &quot;Arial&quot;;</string>
</item>
<item alignment="Qt::AlignRight|Qt::AlignBottom">
<widget class="QLabel" name="banner">
<property name="enabled">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: black;</string>
</property>

View File

@@ -1535,11 +1535,12 @@ void GMainWindow::ConnectMenuEvents() {
connect_menu(ui->action_Show_Folders_In_List, &GMainWindow::OnToggleFoldersInList);
connect_menu(ui->action_Reset_Window_Size_720, &GMainWindow::ResetWindowSize720);
connect_menu(ui->action_Reset_Window_Size_800, &GMainWindow::ResetWindowSize800);
connect_menu(ui->action_Reset_Window_Size_900, &GMainWindow::ResetWindowSize900);
connect_menu(ui->action_Reset_Window_Size_1080, &GMainWindow::ResetWindowSize1080);
ui->menu_Reset_Window_Size->addActions({ui->action_Reset_Window_Size_720,
ui->action_Reset_Window_Size_900,
ui->action_Reset_Window_Size_1080});
ui->menu_Reset_Window_Size->addActions(
{ui->action_Reset_Window_Size_720, ui->action_Reset_Window_Size_800,
ui->action_Reset_Window_Size_900, ui->action_Reset_Window_Size_1080});
// Multiplayer
connect(ui->action_View_Lobby, &QAction::triggered, multiplayer_state,
@@ -1756,8 +1757,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
QMessageBox::warning(this, tr("Derivation Components Missing"),
tr("Encryption keys are missing. "
"In order to use this emulator"
"you need to provide your own prod.keys"
"Some games might also require your own title.keys as well"
"you need to provide your own encryption keys"
"in order to play them."));
return false;
}
@@ -3531,6 +3531,14 @@ void GMainWindow::ResetWindowSize720() {
ResetWindowSize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
}
void GMainWindow::ResetWindowSize800() {
if (!ui->action_Single_Window_Mode->isChecked()) {
render_window->resize(1280, 800);
} else {
resize(1280, 800);
}
}
void GMainWindow::ResetWindowSize900() {
ResetWindowSize(1600U, 900U);
}
@@ -4631,9 +4639,9 @@ void GMainWindow::OnCheckFirmwareDecryption() {
if (!ContentManager::AreKeysPresent()) {
QMessageBox::warning(this, tr("Derivation Components Missing"),
tr("Encryption keys are missing. "
"You need to provide both your own title.keys "
"and your own prod.keys "
"in order to play games"));
"In order to use this emulator"
"you need to provide your own encryption keys"
"in order to play them."));
}
SetFirmwareVersion();

View File

@@ -393,6 +393,7 @@ private slots:
void ToggleWindowMode();
void ResetWindowSize(u32 width, u32 height);
void ResetWindowSize720();
void ResetWindowSize800();
void ResetWindowSize900();
void ResetWindowSize1080();
void OnAlbum();

View File

@@ -45,7 +45,7 @@
<x>0</x>
<y>0</y>
<width>1280</width>
<height>21</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -102,6 +102,14 @@
<property name="iconText">
<string>Reset Window Size to 720p</string>
</property>
</action>
<action name="action_Reset_Window_Size_800">
<property name="text">
<string>Reset Window Size to &amp;800p</string>
</property>
<property name="iconText">
<string>Reset Window Size to 800p</string>
</property>
</action>
<action name="action_Reset_Window_Size_900">
<property name="text">
@@ -124,7 +132,7 @@
<addaction name="action_Display_Dock_Widget_Headers"/>
<addaction name="action_Show_Filter_Bar"/>
<addaction name="action_Show_Status_Bar"/>
<addaction name="action_Show_Folders_In_List" />
<addaction name="action_Show_Folders_In_List"/>
<addaction name="separator"/>
<addaction name="menu_Reset_Window_Size"/>
<addaction name="menu_View_Debugging"/>

View File

@@ -408,7 +408,7 @@ if (MSVC)
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data
)
else()
if (APPLE)
if (APPLE OR ARCHITECTURE_arm64)
# error: declaration shadows a typedef in 'interval_base_set<SubType, DomainT, Compare, Interval, Alloc>'
# error: implicit conversion loses integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char')
target_compile_options(video_core PRIVATE -Wno-shadow -Wno-unused-local-typedef)

View File

@@ -1364,6 +1364,7 @@ void Device::CollectToolingInfo() {
LOG_INFO(Render_Vulkan, "Attached debugging tool: {}", name);
has_renderdoc = has_renderdoc || name == "RenderDoc";
has_nsight_graphics = has_nsight_graphics || name == "NVIDIA Nsight Graphics";
has_radeon_gpu_profiler = has_radeon_gpu_profiler || name == "Radeon GPU Profiler";
}
}

View File

@@ -592,7 +592,7 @@ public:
/// Returns true when a known debugging tool is attached.
bool HasDebuggingToolAttached() const {
return has_renderdoc || has_nsight_graphics;
return has_renderdoc || has_nsight_graphics || has_radeon_gpu_profiler;
}
/// @returns True if compute pipelines can cause crashing.
@@ -821,6 +821,7 @@ private:
bool has_broken_parallel_compiling{}; ///< Has broken parallel shader compiling.
bool has_renderdoc{}; ///< Has RenderDoc attached
bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
bool has_radeon_gpu_profiler{}; ///< Has Radeon GPU Profiler attached.
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
bool must_emulate_scaled_formats{}; ///< Requires scaled vertex format emulation