Skip to content

Commit

Permalink
Disable the "Disable screen saver" option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tillsunset authored and Exzap committed Mar 29, 2023
1 parent 02ec40b commit aa63a6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/GeneralSettings2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ wxPanel* GeneralSettings2::AddGeneralPage(wxNotebook* notebook)
m_disable_screensaver = new wxCheckBox(box, wxID_ANY, _("Disable screen saver"));
m_disable_screensaver->SetToolTip(_("Prevents the system from activating the screen saver or going to sleep while running a game."));
second_row->Add(m_disable_screensaver, 0, botflag, 5);
#ifdef BOOST_OS_MACOS
m_disable_screensaver->SetValue(false);
m_disable_screensaver->Enable(false);
#endif

box_sizer->Add(second_row, 0, wxEXPAND, 5);
}
Expand Down
3 changes: 3 additions & 0 deletions src/util/ScreenSaver/ScreenSaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ class ScreenSaver
public:
static void SetInhibit(bool inhibit)
{
#ifdef BOOST_OS_MACOS
return;
#endif
// Initialize video subsystem if necessary
if (SDL_WasInit(SDL_INIT_VIDEO) == 0)
{
Expand Down

0 comments on commit aa63a6a

Please sign in to comment.