[vlc-devel] [PATCH]Win32 screensaver disable change part II
Laurent Aimar
fenrir at elivagar.org
Tue May 3 14:29:35 CEST 2011
On Tue, May 03, 2011 at 03:12:48PM +0300, Kaarlo Räihä wrote:
>
>
> 2011/5/3 Laurent Aimar <fenrir at elivagar.org>
>
> On Mon, May 02, 2011 at 07:43:59PM +0300, Kaarlo R ih wrote:
> > In year 2008 I sent patch that changed Windows screensaver disable
> behavior.
> > That patch was horrible, and after few years I tried making it better.
> >
> > The issues it should solve are same (there are limited Windows accounts
> which
> > cannot change SPI_GETLOWPOWERTIMEOUT settings and if VLC crashes the
> original
> > settings aren't returned) but now there isn't code duplication.
> >
> > It isn't perfect code wise, since I have NO clue how to create thread
> without
> > parameters using vlc thread functions. Something like
> >
> > create_thread (function_to_run, id)
> > and
> > kill_thread(id)
> >
> > would be perfect for this, since I don't pass any parameters. Also I
> ain't sure
> > if cancel works with vlc_thread_create, so it might work incorrectly.
>
> There is a patch at
> https://trac.videolan.org/vlc/ticket/4275
> that seems to address the screensaver issues without using thread etc
>
>
> AFAIK it still causes issues if VLC crashes. And some limited setups cannot
> change those values. Plus threading way allows additional code changes, which
> can be used to enable screensaver when VLC is paused (people have requested
> this).
Well, I don't really like the thread way as it has a useless thread that
periodically wake up (useless CPU and power usage). So, if it can be avoided
I think it is better. But as I said, I don't know the win32 API enought.
--
fenrir
More information about the vlc-devel
mailing list