Kevin Laity
Kevin Laity

Reputation: 2481

Programmatically block screen saver in Mac OSX

Is it possible to programatically ask Mac OS X not to turn on the screen saver while your application is active?

Upvotes: 2

Views: 1217

Answers (1)

i_am_jorf
i_am_jorf

Reputation: 54600

You want to use:

UpdateSystemActivity(UsrActivity);

Here is Apple's example code.

Be aware this is deprecated for 64bit binaries, and I have not found a suitable replacement, but the struggle continues.

Upvotes: 3

Related Questions