summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 087cfaa26..a81635fa4 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -29,10 +29,11 @@
29#include "core/hle/service/filesystem/filesystem.h" 29#include "core/hle/service/filesystem/filesystem.h"
30#include "core/loader/loader.h" 30#include "core/loader/loader.h"
31#include "core/telemetry_session.h" 31#include "core/telemetry_session.h"
32#include "frontend_common/config.h"
32#include "input_common/main.h" 33#include "input_common/main.h"
33#include "network/network.h" 34#include "network/network.h"
35#include "sdl_config.h"
34#include "video_core/renderer_base.h" 36#include "video_core/renderer_base.h"
35#include "yuzu_cmd/config.h"
36#include "yuzu_cmd/emu_window/emu_window_sdl2.h" 37#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
37#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h" 38#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h"
38#include "yuzu_cmd/emu_window/emu_window_sdl2_null.h" 39#include "yuzu_cmd/emu_window/emu_window_sdl2_null.h"
@@ -62,6 +63,10 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
62} 63}
63#endif 64#endif
64 65
66#ifdef __unix__
67#include "common/linux/gamemode.h"
68#endif
69
65static void PrintHelp(const char* argv0) { 70static void PrintHelp(const char* argv0) {
66 std::cout << "Usage: " << argv0 71 std::cout << "Usage: " << argv0
67 << " [options] <filename>\n" 72 << " [options] <filename>\n"
@@ -300,7 +305,7 @@ int main(int argc, char** argv) {
300 } 305 }
301 } 306 }
302 307
303 Config config{config_path}; 308 SdlConfig config{config_path};
304 309
305 // apply the log_filter setting 310 // apply the log_filter setting
306 // the logger was initialized before and doesn't pick up the filter on its own 311 // the logger was initialized before and doesn't pick up the filter on its own
@@ -424,6 +429,10 @@ int main(int argc, char** argv) {
424 exit(0); 429 exit(0);
425 }); 430 });
426 431
432#ifdef __unix__
433 Common::Linux::StartGamemode();
434#endif
435
427 void(system.Run()); 436 void(system.Run());
428 if (system.DebuggerEnabled()) { 437 if (system.DebuggerEnabled()) {
429 system.InitializeDebugger(); 438 system.InitializeDebugger();
@@ -435,6 +444,10 @@ int main(int argc, char** argv) {
435 void(system.Pause()); 444 void(system.Pause());
436 system.ShutdownMainProcess(); 445 system.ShutdownMainProcess();
437 446
447#ifdef __unix__
448 Common::Linux::StopGamemode();
449#endif
450
438 detached_tasks.WaitForAllTasks(); 451 detached_tasks.WaitForAllTasks();
439 return 0; 452 return 0;
440} 453}