mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -180,6 +180,25 @@ CFrame::CFrame(wxFrame* parent,
|
|||||||
UpdateGUI();
|
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()
|
void CFrame::CreateMenu()
|
||||||
{
|
{
|
||||||
|
@ -50,6 +50,10 @@ class CFrame
|
|||||||
void RecreateToolbar();
|
void RecreateToolbar();
|
||||||
void CreateMenu();
|
void CreateMenu();
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Override window proc for tricks like screensaver disabling
|
||||||
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
#endif
|
||||||
// event handler
|
// event handler
|
||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
void OnHelp(wxCommandEvent& event);
|
void OnHelp(wxCommandEvent& event);
|
||||||
|
Reference in New Issue
Block a user