* updated wlroots (0.17.3 -> 0.18.1)
[t2sde.git] / package / xorg / xf86-video-ps3 / hwcursor-opt.patch
blob7419d8bcea4696dee3cd45fd909ad88f34351222
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/xf86-video-ps3/hwcursor-opt.patch
3 # Copyright (C) 2024 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- xf86-video-ps3/src/ps3_cursor.c.vanilla 2024-04-09 21:17:07.042830970 +0200
15 +++ xf86-video-ps3/src/ps3_cursor.c 2024-04-09 21:18:01.895830730 +0200
16 @@ -1,6 +1,6 @@
18 + * Copyright (c) 2019,2024 René Rebe <rene@exactcode.de>
19 * Copyright (c) 2003 NVIDIA, Corporation
20 - * Copyright (c) 2019,2020 René Rebe <rene@exactcode.de>
22 * Permission is hereby granted, free of charge, to any person obtaining a
23 * copy of this software and associated documentation files (the
24 --- xf86-video-ps3/src/ps3.c.vanilla 2024-04-09 21:20:03.578830196 +0200
25 +++ xf86-video-ps3/src/ps3.c 2024-04-09 21:34:18.018826446 +0200
26 @@ -1,9 +1,10 @@
28 + * PS3 Modifications
29 + * Copyright (C) 2019-2024 René Rebe <rene@exactcode.de>
30 + * Copyright (c) Vivien Chappelier (vivien.chappelier@free.fr)
31 + *
32 * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
33 * Michel Dänzer, <michel@tungstengraphics.com>
34 - *
35 - * PS3 Modifications (c) Vivien Chappelier (vivien.chappelier@free.fr)
36 - * Copyright (C) 2019,2020 René Rebe <rene@exactcode.de>
39 #ifdef HAVE_CONFIG_H
40 @@ -93,12 +94,14 @@
41 typedef enum {
42 OPTION_NOACCEL,
43 OPTION_FBDEV,
44 - OPTION_DEBUG
45 + OPTION_HWCURSOR,
46 + OPTION_DEBUG,
47 } PS3Opts;
49 static const OptionInfoRec PS3Options[] = {
50 { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
51 { OPTION_FBDEV, "fbdev", OPTV_STRING, {0}, FALSE },
52 + { OPTION_HWCURSOR, "HWCursor", OPTV_BOOLEAN, {0}, FALSE },
53 { OPTION_DEBUG, "debug", OPTV_BOOLEAN, {0}, FALSE },
54 { -1, NULL, OPTV_NONE, {0}, FALSE }
56 @@ -333,6 +336,13 @@
57 } else
58 pPS3->NoAccel = FALSE;
60 + if (xf86ReturnOptValBool(pPS3->Options, OPTION_HWCURSOR, TRUE)) {
61 + pPS3->HWCursor = TRUE;
62 + } else {
63 + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "HWCursor disabled\n");
64 + pPS3->HWCursor = FALSE;
65 + }
67 /* select video modes */
69 xf86DrvMsg(pScrn->scrnIndex, X_INFO, "checking modes against framebuffer device...\n");
70 @@ -522,7 +534,7 @@
71 miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
73 /* Initialize HW cursor layer. Must follow software cursor initialization */
74 - if (1) { //pNv->HWCursor) {
75 + if (pPS3->HWCursor) {
76 pPS3->alphaCursor = 1;
77 if(!NVCursorInit(pScreen))
78 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
79 --- xf86-video-ps3/src/ps3.h.vanilla 2024-04-09 21:34:56.203826278 +0200
80 +++ xf86-video-ps3/src/ps3.h 2024-04-09 21:35:53.573826027 +0200
81 @@ -1,3 +1,8 @@
82 +/*
83 + * Copyright (C) 2019-2024 René Rebe <rene@exactcode.de>
84 + * Copyright (c) Vivien Chappelier (vivien.chappelier@free.fr)
85 + */
87 #ifndef __PS3_H__
88 #define __PS3_H__
90 @@ -18,6 +23,7 @@
91 ExaDriverPtr EXADriverPtr;
92 xf86CursorInfoPtr CursorInfoRec;
93 Bool NoAccel;
94 + Bool HWCursor;
96 int fd;
97 long vram_base;