DXGL r872 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r871
|
r872
|
r873
>
Date:
23:48, 28 September 2018
Author:
admin
Status:
new
Tags:
Comment:
Add fallback stub functions for wglSwapIntervalEXT and wglGetSwapIntervalEXT for compatibility with old versions of Mesa.
Modified paths:
/ddraw/glExtensions.c
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glExtensions.c
—
—
@@ -19,6 +19,17 @@
20
20
#include "glExtensions.h"
21
21
extern DXGLCFG dxglcfg;
22
22
23
+static int stubswapinterval = 1;
24
+static BOOL APIENTRY wglSwapIntervalEXTStub(GLint interval)
25
+{
26
+ stubswapinterval = interval;
27
+ return FALSE;
28
+}
29
+static GLint APIENTRY wglGetSwapIntervalEXTStub()
30
+{
31
+ return stubswapinterval;
32
+}
33
+
23
34
void glExtensions_Init(glExtensions *ext)
24
35
{
25
36
const GLubyte *glversion;
—
—
@@ -231,4 +242,9 @@
232
243
}
233
244
ext->wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
234
245
ext->wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
246
+ if((!ext->wglSwapIntervalEXT) || (!ext->wglGetSwapIntervalEXT))
247
+ {
248
+ ext->wglSwapIntervalEXT = wglSwapIntervalEXTStub;
249
+ ext->wglGetSwapIntervalEXT = wglGetSwapIntervalEXTStub;
250
+ }
235
251
}
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version