This commit is contained in:
Enrico Weigelt 2025-07-04 18:17:15 +02:00 committed by GitHub
commit 1b67b67ace
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,28 @@
#include <dix-config.h>
#include <X11/Xfuncproto.h>
#include <X11/Xproto.h>
#include "os/osdep.h"
#include "xf86_compat.h"
/*
* needed for NVidia proprietary driver 570.x and 575.x version
*
* they really need special functions for trivial struct initialization :p
*
* this function had been obsolete and removed long ago, but NVidia folks
* still didn't do basic maintenance and fixed their driver
*/
_X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension);
void GEInitEvent(xGenericEvent *ev, int extension)
{
xf86NVidiaBugObsoleteFunc("GEInitEvent()");
ev->type = GenericEvent;
ev->extension = extension;
ev->length = 0;
}

View File

@ -1,8 +1,10 @@
srcs_xorg_compat = [
'clientexception.c',
'geeventinit.c',
'log.c',
'nvidiabug.c',
'ones.c',
'timercheck.c',
'xf86Helper.c',
]

View File

@ -0,0 +1,23 @@
#include <dix-config.h>
#include <X11/Xfuncproto.h>
#include "os/osdep.h"
#include "xf86_compat.h"
/*
* needed for NVidia proprietary driver 570.x and 575.x version
* force the server to see if any timer callbacks should be called
*
* this function had been obsolete and removed long ago, but NVidia folks
* still didn't do basic maintenance and fixed their driver
*/
_X_EXPORT void TimerCheck(void);
void TimerCheck(void) {
xf86NVidiaBugObsoleteFunc("TimerCheck()");
DoTimers(GetTimeInMillis());
}

View File

@ -105,7 +105,6 @@ struct _OsTimerRec {
};
static void DoTimer(OsTimerPtr timer, CARD32 now);
static void DoTimers(CARD32 now);
static void CheckAllTimers(void);
static volatile struct xorg_list timers;
@ -276,8 +275,7 @@ DoTimer(OsTimerPtr timer, CARD32 now)
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
}
static void
DoTimers(CARD32 now)
void DoTimers(CARD32 now)
{
OsTimerPtr timer;

View File

@ -225,4 +225,7 @@ Ones(unsigned long mask)
#define LIMITCLIENTS 256 /* Must be a power of 2 and <= MAXCLIENTS */
/* run timers that are expired at timestamp `now` */
void DoTimers(CARD32 now);
#endif /* _OSDEP_H_ */