mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 13:31:18 +12:00
Add GameMode support for Linux build (#796)
This commit is contained in:
parent
b74ae21953
commit
1bcdb35e42
10 changed files with 467 additions and 1 deletions
|
@ -61,6 +61,11 @@
|
|||
#include "gui/helpers/wxWayland.h"
|
||||
#endif
|
||||
|
||||
//GameMode support
|
||||
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
|
||||
#include "gamemode_client.h"
|
||||
#endif
|
||||
|
||||
#include "Cafe/TitleList/TitleInfo.h"
|
||||
#include "Cafe/TitleList/TitleList.h"
|
||||
#include "wxHelper.h"
|
||||
|
@ -581,6 +586,23 @@ bool MainWindow::FileLoad(std::wstring fileName, wxLaunchGameEvent::INITIATED_BY
|
|||
if (ActiveSettings::FullscreenEnabled())
|
||||
SetFullScreen(true);
|
||||
|
||||
//GameMode support
|
||||
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
|
||||
if(GetConfig().feral_gamemode)
|
||||
{
|
||||
// attempt to start gamemode
|
||||
if(gamemode_request_start() < 0)
|
||||
{
|
||||
// GameMode failed to start
|
||||
cemuLog_log(LogType::Force, "Could not start GameMode");
|
||||
}
|
||||
else
|
||||
{
|
||||
cemuLog_log(LogType::Force, "GameMode has been started.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CreateCanvas();
|
||||
CafeSystem::LaunchForegroundTitle();
|
||||
RecreateMenu();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue