[MPlayer-cygwin] Stopping the screensaver in windows

deje at miki.hu deje at miki.hu
Fri Aug 5 16:44:04 CEST 2005


Hi
Sorry for bothering but I think registry changes like this should be
avoided greatly, and use windows api calls instead - it is much more
portable. Anyway directx driver includes the ability to disable
screensaver, which works well, other drivers miss it. The main reason is
that when windows tries to start screensaver, it sends a win message to
the message handler of the process, asking whether it can start it or
not. This is the clean and preferred way (vo_directx works this way),
and this method should be implemented in other output drivers also.
I personally don't like when a user program changes system settings,
because it may hang and won't reset that setting after killing it.
That is my opinion about this.
On worst case use a frontend which has the ability for the correct
screensaver disabling (my frontend has it anyway :)))

Bye

>On Friday 05 August 2005 02:16, Steven Neisius wrote:
>> I got tired of the windows screen saver coming on while watching videos
>> during movies on mplayer.  I decided to build a little batch file to
>> work around it. It turned out to be 3 (short) files but I was wondering
>> if it could get intergrated into the source for other peoples enjoyment.
>>
>> mplayer.bat
>>     set run=%~dp0                      #makes var for current dir that
>> mplayer ran from
>>     regedit /s %run%ssoff.reg     #turns off screen saver for current
>> user via reg key
>>     %run%mplayer.exe %*           #runs mplayer, passing command line
>> options
>>     regedit /s %run%sson.reg     #turns screen saver back on
>>
>> ssoff.reg
>>     Windows Registry Editor Version 5.00
>>
>>     [HKEY_CURRENT_USER\Control Panel\Desktop]
>>     "ScreenSaveActive"="0"
>>
>> sson.reg
>>     Windows Registry Editor Version 5.00
>>
>>     [HKEY_CURRENT_USER\Control Panel\Desktop]
>>     "ScreenSaveActive"="1"
>>
>> Thats about it... so if theres some way to make thoes changes within the
>> normal program then it would be cool. =)
>>

>
>Sure. If the above registry changes are all that are needed and noone is
>against. I'll implement something like this.
>
>Sascha
>
>_______________________________________________
>MPlayer-cygwin mailing list
>MPlayer-cygwin at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mplayer-cygwin




More information about the MPlayer-cygwin mailing list