summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp5
-rw-r--r--src/yuzu_cmd/default_ini.h5
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp13
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.h3
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp8
-rw-r--r--src/yuzu_cmd/yuzu.cpp4
6 files changed, 33 insertions, 5 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index d82438502..1a812cb87 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -433,6 +433,11 @@ void Config::ReadValues() {
sdl2_config->Get("WebService", "web_api_url", "https://api.yuzu-emu.org");
Settings::values.yuzu_username = sdl2_config->Get("WebService", "yuzu_username", "");
Settings::values.yuzu_token = sdl2_config->Get("WebService", "yuzu_token", "");
+
+ // Services
+ Settings::values.bcat_backend = sdl2_config->Get("Services", "bcat_backend", "boxcat");
+ Settings::values.bcat_boxcat_local =
+ sdl2_config->GetBoolean("Services", "bcat_boxcat_local", false);
}
void Config::Reload() {
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h
index a6171c3ed..8d18a4a5a 100644
--- a/src/yuzu_cmd/default_ini.h
+++ b/src/yuzu_cmd/default_ini.h
@@ -251,6 +251,11 @@ web_api_url = https://api.yuzu-emu.org
yuzu_username =
yuzu_token =
+[Services]
+# The name of the backend to use for BCAT
+# If this is set to 'boxcat' boxcat will be used, otherwise a null implementation will be used
+bcat_backend =
+
[AddOns]
# Used to disable add-ons
# List of title IDs of games that will have add-ons disabled (separated by '|'):
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index a6edc089a..b1c512db1 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -4,6 +4,9 @@
#include <SDL.h>
#include "common/logging/log.h"
+#include "common/scm_rev.h"
+#include "core/core.h"
+#include "core/perf_stats.h"
#include "input_common/keyboard.h"
#include "input_common/main.h"
#include "input_common/motion_emu.h"
@@ -170,6 +173,16 @@ void EmuWindow_SDL2::PollEvents() {
break;
}
}
+
+ const u32 current_time = SDL_GetTicks();
+ if (current_time > last_time + 2000) {
+ const auto results = Core::System::GetInstance().GetAndResetPerfStats();
+ const auto title = fmt::format(
+ "yuzu {} | {}-{} | FPS: {:.0f} ({:.0%})", Common::g_build_fullname,
+ Common::g_scm_branch, Common::g_scm_desc, results.game_fps, results.emulation_speed);
+ SDL_SetWindowTitle(render_window, title.c_str());
+ last_time = current_time;
+ }
}
void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) {
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
index d8051ebdf..eaa971f77 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
@@ -60,4 +60,7 @@ protected:
/// Internal SDL2 render window
SDL_Window* render_window;
+
+ /// Keeps track of how often to update the title bar during gameplay
+ u32 last_time = 0;
};
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
index f91b071bf..6fde694a2 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
@@ -50,7 +50,7 @@ private:
};
bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
- std::vector<std::string> unsupported_ext;
+ std::vector<std::string_view> unsupported_ext;
if (!GLAD_GL_ARB_buffer_storage)
unsupported_ext.push_back("ARB_buffer_storage");
@@ -62,6 +62,8 @@ bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
unsupported_ext.push_back("ARB_texture_mirror_clamp_to_edge");
if (!GLAD_GL_ARB_multi_bind)
unsupported_ext.push_back("ARB_multi_bind");
+ if (!GLAD_GL_ARB_clip_control)
+ unsupported_ext.push_back("ARB_clip_control");
// Extensions required to support some texture formats.
if (!GLAD_GL_EXT_texture_compression_s3tc)
@@ -71,8 +73,8 @@ bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
if (!GLAD_GL_ARB_depth_buffer_float)
unsupported_ext.push_back("ARB_depth_buffer_float");
- for (const std::string& ext : unsupported_ext)
- LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext);
+ for (const auto& extension : unsupported_ext)
+ LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", extension);
return unsupported_ext.empty();
}
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index bac05b959..3ee088a91 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -186,8 +186,6 @@ int main(int argc, char** argv) {
system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>());
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
- SCOPE_EXIT({ system.Shutdown(); });
-
const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)};
switch (load_result) {
@@ -227,6 +225,8 @@ int main(int argc, char** argv) {
system.RunLoop();
}
+ system.Shutdown();
+
detached_tasks.WaitForAllTasks();
return 0;
}