Port yuzu-emu/yuzu#11946: "Enable (Feral Interactive) Gamemode on Linux" (#7245)

This commit is contained in:
Tobias
2023-12-20 15:08:07 +01:00
committed by GitHub
parent 2e369c03b8
commit c7e9f8449e
14 changed files with 540 additions and 3 deletions

View File

@@ -38,6 +38,10 @@
#include "network/network.h"
#include "video_core/renderer_base.h"
#ifdef __unix__
#include "common/linux/gamemode.h"
#endif
#undef _UNICODE
#include <getopt.h>
#ifndef _MSC_VER
@@ -442,6 +446,10 @@ int main(int argc, char** argv) {
}
}
#ifdef __unix__
Common::Linux::StartGamemode();
#endif
std::thread main_render_thread([&emu_window] { emu_window->Present(); });
std::thread secondary_render_thread([&secondary_window] {
if (secondary_window) {
@@ -493,6 +501,10 @@ int main(int argc, char** argv) {
system.Shutdown();
#ifdef __unix__
Common::Linux::StopGamemode();
#endif
detached_tasks.WaitForAllTasks();
return 0;
}