mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 13:31:18 +12:00
Add cross-platform "disable screen saver" setting (#497)
This commit is contained in:
parent
80b1c50b50
commit
4c697d3755
7 changed files with 65 additions and 7 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "util/helpers/helpers.h"
|
||||
#include "config/CemuConfig.h"
|
||||
#include "Cemu/DiscordPresence/DiscordPresence.h"
|
||||
#include "util/ScreenSaver/ScreenSaver.h"
|
||||
#include "gui/GeneralSettings2.h"
|
||||
#include "gui/GraphicPacksWindow2.h"
|
||||
#include "gui/GameProfileWindow.h"
|
||||
|
@ -565,6 +566,14 @@ bool MainWindow::FileLoad(std::wstring fileName, wxLaunchGameEvent::INITIATED_BY
|
|||
m_discord->UpdatePresence(DiscordPresence::Playing, m_launched_game_name);
|
||||
#endif
|
||||
|
||||
if (GetConfig().disable_screensaver)
|
||||
{
|
||||
ScreenSaver::SetInhibit(true);
|
||||
// TODO: disable when only the game, not Cemu, is closed (a feature not yet implemented)
|
||||
// currently unnecessary because this will happen automatically when Cemu closes
|
||||
// ScreenSaver::SetInhibit(false);
|
||||
}
|
||||
|
||||
if (ActiveSettings::FullscreenEnabled())
|
||||
SetFullScreen(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue