Screen Saver Suppression

BlitzPlus Forums/BlitzPlus Beginners Area/Screen Saver Suppression

Vic 3 Babes(Posted 2007) [#1]
Does anyone know if it's possible to suppress the Screen Saver when playing a game with a Joypad in a Window?

I can't believe that Microsoft haven't sorted this problem.

I have considered having a setting in the options screen that warns the user that their screen-blanker is due to appear, so that they can press a key - but it seems a bit silly.

Thanks in anticipation.


b32(Posted 2007) [#2]
I tried this in blitz3d, but I think it can be used with b+, too:
http://www.blitzbasic.com/Community/posts.php?topic=67312


Gabriel(Posted 2007) [#3]
Aren't you returning before freeing the bank in that function?


b32(Posted 2007) [#4]
Yes, you are right Gabriel, updated the code.


Vic 3 Babes(Posted 2007) [#5]
Thanks - I'll have a look - but I'm not using B+ any more - I've gone back to B2D.


Vic 3 Babes(Posted 2007) [#6]
btw - I tried using mousemove() - but it didn't work, obviously :)

I've put an option in the settings so that an icon appears to warn the user that the screensaver is due, and they should press the key that they chose in the settings screen.

Not - ideal, but at least I can play without it interfering now.


Vic 3 Babes(Posted 2007) [#7]
I've just found a function in the User Input area of the Code Archives which suggests using MoveMouse - but I swear this didn't work when I tried it - I'll have to try it again.


b32(Posted 2007) [#8]
Is there a CallDLL function in B2D ? If there is, you could try calling the "SystemParametersInfoA" with that command.


Vic 3 Babes(Posted 2007) [#9]
I tried the MouseMove() thing again, but it definitely doesn't work.

Yes I think there is a callDLL function - just never used it. What would SystemParametersInfoA actually do?

Thanks


b32(Posted 2007) [#10]
You can use it to disable and enable the screensaver