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:
parent
45397aaa8e
commit
60c65b53a5
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue