Add some functionality via sysctl to syscons.
hw.syscons.saver.keybonly: used to specify that only input is to interrupt the screensaver. This allows one to run a chatty console app but still have the screen blank out until a key is pressed. There should probably also be an ioctl for this, we'll do that later. hw.syscons.saver.blanktime: exports the screensaver timeout via sysctl. Submitted by: Olivier Houchard <doginou@cognet.ci0.org>
This commit is contained in:
parent
e9ad04e4e6
commit
de4dc9595e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93897
@ -89,6 +89,7 @@ static default_attr kernel_default = {
|
||||
};
|
||||
|
||||
static int sc_console_unit = -1;
|
||||
static int sc_saver_keyb_only;
|
||||
static scr_stat *sc_console;
|
||||
static struct tty *sc_console_tty;
|
||||
static void *kernel_console_ts;
|
||||
@ -108,6 +109,12 @@ static void none_saver(sc_softc_t *sc, int blank) { }
|
||||
static void (*current_saver)(sc_softc_t *, int) = none_saver;
|
||||
#endif
|
||||
|
||||
SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons");
|
||||
SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver");
|
||||
SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW,
|
||||
&sc_saver_keyb_only, 0, "screen saver interrupted by input only");
|
||||
SYSCTL_INT(_hw_syscons_saver, OID_AUTO, blanktime, CTLFLAG_RW,
|
||||
&scrn_blank_time, 0, "screensaver timeout");
|
||||
#if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT)
|
||||
#include "font.h"
|
||||
#endif
|
||||
@ -2408,7 +2415,7 @@ sc_puts(scr_stat *scp, u_char *buf, int len)
|
||||
{
|
||||
#ifdef DEV_SPLASH
|
||||
/* make screensaver happy */
|
||||
if (!sticky_splash && scp == scp->sc->cur_scp)
|
||||
if (!sticky_splash && scp == scp->sc->cur_scp && !sc_saver_keyb_only)
|
||||
run_scrn_saver = FALSE;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user