From 0dfe97ade17f42901a3c669b415fe0ead27b5963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 21 Aug 2010 17:42:28 +0000 Subject: [PATCH] boot_loader_openfirmware: Preparations for frame buffer Initialize the frame buffer as not enabled. Add checks for this condition and for the debug boot option to the video functions. Code is adapted from bios_ia32 platform. Part of ticket #6105. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38299 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/openfirmware/video.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/system/boot/platform/openfirmware/video.cpp b/src/system/boot/platform/openfirmware/video.cpp index 47f6c38dcd..6711ac7b08 100644 --- a/src/system/boot/platform/openfirmware/video.cpp +++ b/src/system/boot/platform/openfirmware/video.cpp @@ -1,15 +1,21 @@ /* * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2010 Andreas Färber * All rights reserved. Distributed under the terms of the MIT License. */ #include +#include extern "C" void platform_switch_to_logo(void) { + // in debug mode, we'll never show the logo + if ((platform_boot_options() & BOOT_OPTION_DEBUG_OUTPUT) != 0) + return; + // ToDo: implement me } @@ -17,13 +23,21 @@ platform_switch_to_logo(void) extern "C" void platform_switch_to_text_mode(void) { + // nothing to do if we're in text mode + if (!gKernelArgs.frame_buffer.enabled) + return; + // ToDo: implement me + + gKernelArgs.frame_buffer.enabled = false; } extern "C" status_t platform_init_video(void) { + gKernelArgs.frame_buffer.enabled = false; + // ToDo: implement me return B_OK; }