Skip to content

Commit 3dbeda9

Browse files
committed
xfree86: compat: re-add GEInitEvent() for proprietary nvidia driver
Yet another very internal function that the proprietary Nvidia driver is using for unknown reasons. NVidia really needs a separate function for just for some trivial struct initialization and don't manage to add three simple lines to their code, so we have to make an extra function for them. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
1 parent 169f912 commit 3dbeda9

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

hw/xfree86/compat/geeventinit.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <dix-config.h>
2+
3+
#include <X11/Xfuncproto.h>
4+
#include <X11/Xproto.h>
5+
6+
#include "os/osdep.h"
7+
8+
#include "xf86_compat.h"
9+
10+
/*
11+
* needed for NVidia proprietary driver 340.x versions
12+
*
13+
* they really need special functions for trivial struct initialization :p
14+
*
15+
* this function had been obsolete and removed long ago, but NVidia folks
16+
* still didn't do basic maintenance and fixed their driver
17+
*/
18+
19+
_X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension);
20+
21+
void GEInitEvent(xGenericEvent *ev, int extension)
22+
{
23+
xf86NVidiaBugObsoleteFunc("GEInitEvent()");
24+
25+
ev->type = GenericEvent;
26+
ev->extension = extension;
27+
ev->length = 0;
28+
}

hw/xfree86/compat/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ srcs_xorg_compat = [
88

99
if get_option('legacy_nvidia_340x')
1010
srcs_xorg_compat += 'timercheck.c'
11+
srcs_xorg_compat += 'geeventinit.c'
1112
endif
1213

1314
xorg_compat = static_library('xorg_compat',

0 commit comments

Comments
 (0)