DXGL r450 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r449
|
r450
|
r451
>
Date:
01:12, 8 June 2014
Author:
admin
Status:
new
Tags:
Comment:
Fix XP compatibility, which was broken in
r435
.
Modified paths:
/ddraw/ddraw.cpp
(modified) (
history
)
/ddraw/dllmain.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/ddraw.cpp
—
—
@@ -156,6 +156,7 @@
157
157
{
158
158
TRACE_ENTER(3,24,lpGUID,14,lplpDD,14,pUnkOuter);
159
159
if(!lplpDD) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
160
+ if(!dll_cs.LockCount && !dll_cs.OwningThread) InitializeCriticalSection(&dll_cs);
160
161
EnterCriticalSection(&dll_cs);
161
162
HRESULT ret;
162
163
if(gllock || IsCallerOpenGL(_ReturnAddress()))
Index: ddraw/dllmain.cpp
—
—
@@ -18,7 +18,7 @@
19
19
#include "common.h"
20
20
#include "ddraw.h"
21
21
ATOM WindowClass = NULL;
22
-CRITICAL_SECTION dll_cs;
22
+CRITICAL_SECTION dll_cs = {NULL,0,0,NULL,NULL,0};
23
23
BOOL APIENTRY DllMain( HMODULE hModule,
24
24
DWORD ul_reason_for_call,
25
25
LPVOID lpReserved
—
—
@@ -27,7 +27,7 @@
28
28
switch (ul_reason_for_call)
29
29
{
30
30
case DLL_PROCESS_ATTACH:
31
- InitializeCriticalSection(&dll_cs);
31
+ if(!dll_cs.LockCount && !dll_cs.OwningThread) InitializeCriticalSection(&dll_cs);
32
32
GetCurrentConfig(&dxglcfg, true);
33
33
break;
34
34
case DLL_THREAD_ATTACH:
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r435
Allow multiple DirectDraw objects....
admin
01:05, 22 April 2014
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