[haiku-development] Re: Disable screensaver?

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 31 Oct 2008 10:36:04 +0100

scott mc wrote:
> A topic that came up on the Allegro mailing list was about disabling the 
> screensaver when playing a game full screen, since on many systems using 
> a joystick/gamepad doesn't stop the screensaver from coming up. Is there 
> a way on Haiku to do this?  They are talking about adding a function to 
> Allegro, and we would just need to add the Haiku specific function to our 
> port, that is if it's even needed...

For the time being, one can use set_mouse_position() (defined in 
WindowScreen.h). It does not matter if the mouse is always set to the same 
position. One can also get it via BView::GetMouse() at the moment of going 
full screen and then repeatedly set it to the same position (like by using 
a BMessageRunner or some similar pulse mechanism).

Anyways, such a screensaver disabling function is definitely needed, and we 
will add it at some point. The above trick should work until then.

Best regards,
-Stephan

Other related posts: