Commit 84e9f713 authored by Owen Love's avatar Owen Love
Browse files

Tried again to make screen saver stop working if user is printing.

parent 31535ef2
......@@ -15,6 +15,7 @@ int poll_word;
#define OS_Module 0x1e
#define TaskModule_StartTask 0x4d301
#define OS_Find 0x0d
#define PDriver_Info 0x80140
/*------------------------------------------------------------------------*/
......@@ -25,14 +26,16 @@ static int user_currently_printing(void)
_kernel_oserror *err;
int printing = FALSE;
regs.r[0] = 0xcb;
regs.r[1] = (int) "printer:";
regs.r[2] = 0;
err = _kernel_swi(OS_Find, &regs, &regs); /* try and open printer */
regs.r[0] = 0;
err = _kernel_swi(PDriver_Info, &regs, &regs); /* Get PDriver Info */
if (err)
printing = FALSE; /* printer: does not exist - user not printing */
printing = FALSE; /* printer does not exist - user not printing */
else
{
regs.r[0] = 0xc3;
regs.r[1] = (int) "printer:";
regs.r[2] = 0;
_kernel_swi(OS_Find, &regs, &regs); /* try and open printer */
if (regs.r[0] != 0) /* printer: not in use - user not printing */
{
regs.r[1] = regs.r[0];
......
......@@ -4,7 +4,7 @@
;
title-string: ScrSaver
help-string: ScrSaver 0.13
help-string: ScrSaver 0.14
date-string: 09 Oct 1997
initialisation-code: module_initialise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment