Attempt to prevent screensaver from starting when Dolphin is running in the foreground. Can someone test? (only works in Windows)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@716 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-09-28 16:08:48 +00:00
parent 45397aaa8e
commit 60c65b53a5
2 changed files with 23 additions and 0 deletions

View File

@ -180,6 +180,25 @@ CFrame::CFrame(wxFrame* parent,
UpdateGUI();
}
#ifdef _WIN32
WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg)
{
case WM_SYSCOMMAND:
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}
default:
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
}
}
#endif
void CFrame::CreateMenu()
{

View File

@ -50,6 +50,10 @@ class CFrame
void RecreateToolbar();
void CreateMenu();
#ifdef _WIN32
// Override window proc for tricks like screensaver disabling
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif
// event handler
void OnQuit(wxCommandEvent& event);
void OnHelp(wxCommandEvent& event);