DXGL r381 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r380
|
r381
|
r382
>
Date:
01:05, 8 June 2013
Author:
admin
Status:
new
Tags:
Comment:
Create temporary window within DXGLCFG dialog to detect OpenGL features. Fixes broken titlebars when using WindowBlinds on a DWM enabled version of Windows, and black background under Wine.
Modified paths:
/dxglcfg/dxglcfg.cpp
(modified) (
history
)
Diff
[
purge
]
Index: dxglcfg/dxglcfg.cpp
—
—
@@ -340,6 +340,7 @@
341
341
COLORREF OldTextColor,OldBackColor;
342
342
HANDLE token = NULL;
343
343
TOKEN_ELEVATION elevation;
344
+ HWND hGLWnd;
344
345
switch(Msg)
345
346
{
346
347
case WM_INITDIALOG:
—
—
@@ -361,7 +362,8 @@
362
363
// create temporary gl context to get AA and AF settings.
363
364
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&mode);
364
365
pfd.cColorBits = (BYTE)mode.dmBitsPerPel;
365
- dc = GetDC(hWnd);
366
+ hGLWnd = CreateWindow(_T("STATIC"),NULL,WS_CHILD,0,0,16,16,hWnd,NULL,NULL,NULL);
367
+ dc = GetDC(hGLWnd);
366
368
pf = ChoosePixelFormat(dc,&pfd);
367
369
SetPixelFormat(dc,pf,&pfd);
368
370
rc = wglCreateContext(dc);
—
—
@@ -386,7 +388,8 @@
387
389
}
388
390
wglMakeCurrent(dc,NULL);
389
391
wglDeleteContext(rc);
390
- ReleaseDC(hWnd,dc);
392
+ ReleaseDC(hGLWnd,dc);
393
+ DestroyWindow(hGLWnd);
391
394
// Load global settings.
392
395
// scaler
393
396
_tcscpy(buffer,_T("Change desktop resolution"));
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