summaryrefslogtreecommitdiff
path: root/src/lx_video.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2012-07-21 12:36:51 +0200
committerMart Raudsepp <leio@gentoo.org>2012-07-26 07:38:56 +0300
commita83fcb6f84995dc50b8adffc27e264a663fbd606 (patch)
tree9e12ca73eb670f18f703a08b5061b951b0789f7a /src/lx_video.c
parent68646c3119a69a8391a49f2d565672d73829e2c9 (diff)
Initial stab at converting geode to new X1.13 API
Preparing to compile geode on X 1.13 All compiler errors are gone as far as I can tell, but I lack the hardware to verify it works as well.
Diffstat (limited to 'src/lx_video.c')
-rw-r--r--src/lx_video.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lx_video.c b/src/lx_video.c
index cf1c380..5dbe224 100644
--- a/src/lx_video.c
+++ b/src/lx_video.c
@@ -61,7 +61,9 @@
#define TIMER_MASK (OFF_TIMER | FREE_TIMER)
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof((a)) / (sizeof(*(a))))
+#endif
/* Local function prototypes */
static void LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit);
@@ -638,15 +640,15 @@ LXResetVideo(ScrnInfoPtr pScrni)
}
static void
-LXVidBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
+LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL)
{
- ScreenPtr pScrn = screenInfo.screens[i];
- ScrnInfoPtr pScrni = xf86Screens[i];
+ SCREEN_PTR(arg);
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni);
pScrn->BlockHandler = pGeode->BlockHandler;
- (*pScrn->BlockHandler) (i, blockData, pTimeout, pReadmask);
+ (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS);
pScrn->BlockHandler = LXVidBlockHandler;
if (pPriv->videoStatus & TIMER_MASK) {
@@ -684,7 +686,7 @@ LXVidBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
static XF86VideoAdaptorPtr
LXSetupImageVideo(ScreenPtr pScrn)
{
- ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum];
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
XF86VideoAdaptorPtr adapt;
GeodePortPrivRec *pPriv;
@@ -946,7 +948,7 @@ void
LXInitVideo(ScreenPtr pScrn)
{
GeodeRec *pGeode;
- ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum];
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
XF86VideoAdaptorPtr newAdaptor = NULL;
int num_adaptors;