Ticket #9185: Add-hw-cursor-check-to-SupportsWindowMode.patch

File Add-hw-cursor-check-to-SupportsWindowMode.patch, 908 bytes (added by jua, 11 years ago)

Add hw cursor checking

  • src/kits/game/DirectWindow.cpp

    From 462ee72ad70161ca0eb79f3883d28c6348ddf9e5 Mon Sep 17 00:00:00 2001
    From: Julian Harnath <julian.harnath@rwth-aachen.de>
    Date: Sun, 18 Nov 2012 19:26:53 +0100
    Subject: [PATCH] Add hw-cursor check to SupportsWindowMode()
    
    ---
     src/kits/game/DirectWindow.cpp |    6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/src/kits/game/DirectWindow.cpp b/src/kits/game/DirectWindow.cpp
    index ed850a1..74a1a7c 100644
    a b BDirectWindow::SupportsWindowMode(screen_id id)  
    441441{
    442442    display_mode mode;
    443443    status_t status = BScreen(id).GetMode(&mode);
    444     if (status == B_OK)
    445         return (mode.flags & B_PARALLEL_ACCESS) != 0;
     444    if (status == B_OK) {
     445        const uint32 requiredFlags = B_PARALLEL_ACCESS | B_HARDWARE_CURSOR;
     446        return (mode.flags & requiredFlags) == requiredFlags;
     447    }
    446448
    447449    return false;
    448450}