navit-project.org

forum for navit navigation tool
It is currently 23 Jul 2017, 22:42
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the installation and configuration of Navit.

Some notes before your first post:

Please provide as much informations as possible:



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Preventing screensaver
PostPosted: 27 Dec 2016, 14:47 
Offline

Joined: 30 Apr 2015, 16:33
Posts: 31
Hi,

When running navit, it would be beneficial to the users to have the screensaver/sleep suspended. There was a request http://trac.navit-project.org/ticket/194 which recommended running a script or 3d party program, but that is not really helpful. The method to suspend screensaver is described here for example: http://stackoverflow.com/questions/6292 ... is-running
Previously I implemented it in my Qt5 code as follows:
Code:
    static void noSleep(){
        if (SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED) == 0){
           SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
        }
        qDebug() << "Disabled sleep mode";
    }
    static void canSleep(){
        SetThreadExecutionState(ES_CONTINUOUS);
        qDebug() << "Enabled sleep mode";
    }


Can you add this to navit under conditional directive to disable sleep mode at least in Windows when navit is full screen?

Happy new year everyone!


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS