BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / accelerants / vesa / dpms.cpp
blobddb778b7a59cbb7b1aecdfca720f0310a22b2aa4
1 /*
2 * Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <errno.h>
9 #include "accelerant_protos.h"
10 #include "accelerant.h"
13 uint32
14 vesa_dpms_capabilities(void)
16 return gInfo->shared_info->dpms_capabilities;
20 uint32
21 vesa_dpms_mode(void)
23 uint32 mode;
24 if (ioctl(gInfo->device, VESA_GET_DPMS_MODE, &mode, sizeof(mode)) != 0)
25 return B_DPMS_ON;
27 return mode;
31 status_t
32 vesa_set_dpms_mode(uint32 mode)
34 if (ioctl(gInfo->device, VESA_SET_DPMS_MODE, &mode, sizeof(mode)) != 0)
35 return errno;
37 return B_OK;