summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu_cmd/yuzu.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 0416d5951..1c3a1809b 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -63,6 +63,10 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
63} 63}
64#endif 64#endif
65 65
66#ifdef __linux__
67#include <gamemode_client.h>
68#endif
69
66static void PrintHelp(const char* argv0) { 70static void PrintHelp(const char* argv0) {
67 std::cout << "Usage: " << argv0 71 std::cout << "Usage: " << argv0
68 << " [options] <filename>\n" 72 << " [options] <filename>\n"
@@ -425,6 +429,16 @@ int main(int argc, char** argv) {
425 exit(0); 429 exit(0);
426 }); 430 });
427 431
432#ifdef __linux__
433 if (Settings::values.disable_gamemode) {
434 if (gamemode_request_start() < 0) {
435 LOG_WARNING(Frontend, "Failed to start gamemode: {}", gamemode_error_string());
436 } else {
437 LOG_INFO(Frontend, "Started gamemode");
438 }
439 }
440#endif
441
428 void(system.Run()); 442 void(system.Run());
429 if (system.DebuggerEnabled()) { 443 if (system.DebuggerEnabled()) {
430 system.InitializeDebugger(); 444 system.InitializeDebugger();
@@ -436,6 +450,16 @@ int main(int argc, char** argv) {
436 void(system.Pause()); 450 void(system.Pause());
437 system.ShutdownMainProcess(); 451 system.ShutdownMainProcess();
438 452
453#ifdef __linux__
454 if (Settings::values.disable_gamemode) {
455 if (gamemode_request_end() < 0) {
456 LOG_WARNING(Frontend, "Failed to stop gamemode: {}", gamemode_error_string());
457 } else {
458 LOG_INFO(Frontend, "Stopped gamemode");
459 }
460 }
461#endif
462
439 detached_tasks.WaitForAllTasks(); 463 detached_tasks.WaitForAllTasks();
440 return 0; 464 return 0;
441} 465}