From 5acee2a989d9cfa1abfde27600e396c25c9976cb Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Wed, 22 Aug 2012 13:49:34 +0000 Subject: [PATCH] graphics.library: Use the 'VBlank' field to indicate that the TOF_VBlank server is installed This prevents duplicate installation of TOF_VBlank when starting graphics.library 'late' on a headless AROS installation. (One of many bugs that need to be fixed for AROS headless) Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@45638 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/graphics/graphics_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rom/graphics/graphics_init.c b/rom/graphics/graphics_init.c index 7d00bed3fe..dd7c698a4d 100644 --- a/rom/graphics/graphics_init.c +++ b/rom/graphics/graphics_init.c @@ -115,7 +115,7 @@ static int GfxOpen(struct GfxBase *LIBBASE) sysTA.ta_YSize = def->tf_YSize; } - if(LIBBASE->LibNode.lib_OpenCnt == 0) + if(! LIBBASE->VBlank) { NEWLIST(&LIBBASE->TOF_WaitQ); LIBBASE->vbsrv.is_Code = (VOID_FUNC)TOF_VBlank; @@ -126,6 +126,7 @@ static int GfxOpen(struct GfxBase *LIBBASE) /* Add a VBLANK server to take care of TOF waiting tasks. */ AddIntServer(INTB_VERTB, &LIBBASE->vbsrv); + LIBBASE->VBlank = 50; } if (!GfxBase->gb_LayersBase) -- 2.11.4.GIT