From 40644d43f700cb0075db0eea288078bda7cf4527 Mon Sep 17 00:00:00 2001 From: flodavid Date: Fri, 3 Nov 2023 15:41:16 +0100 Subject: yuzu: create linux group in general settings - Create files dedicated to starting and stopping gamemode functions - Use them in yuzu and yuzu_cmd modules --- src/yuzu_cmd/yuzu.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 1c3a1809b..a81635fa4 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -63,8 +63,8 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; } #endif -#ifdef __linux__ -#include +#ifdef __unix__ +#include "common/linux/gamemode.h" #endif static void PrintHelp(const char* argv0) { @@ -429,14 +429,8 @@ int main(int argc, char** argv) { exit(0); }); -#ifdef __linux__ - if (Settings::values.disable_gamemode) { - if (gamemode_request_start() < 0) { - LOG_WARNING(Frontend, "Failed to start gamemode: {}", gamemode_error_string()); - } else { - LOG_INFO(Frontend, "Started gamemode"); - } - } +#ifdef __unix__ + Common::Linux::StartGamemode(); #endif void(system.Run()); @@ -450,14 +444,8 @@ int main(int argc, char** argv) { void(system.Pause()); system.ShutdownMainProcess(); -#ifdef __linux__ - if (Settings::values.disable_gamemode) { - if (gamemode_request_end() < 0) { - LOG_WARNING(Frontend, "Failed to stop gamemode: {}", gamemode_error_string()); - } else { - LOG_INFO(Frontend, "Stopped gamemode"); - } - } +#ifdef __unix__ + Common::Linux::StopGamemode(); #endif detached_tasks.WaitForAllTasks(); -- cgit v1.2.3