mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 11:28:17 -04:00
add debug log stuff
This commit is contained in:
parent
daebe941f8
commit
ceaafbdeb5
@ -264,8 +264,7 @@ static DWORD GetAvailVidMem() {
|
|||||||
DDSCAPS ddsCaps;
|
DDSCAPS ddsCaps;
|
||||||
DWORD dwTotal,dwFree;
|
DWORD dwTotal,dwFree;
|
||||||
ZeroMemory(&ddsCaps,sizeof(DDSCAPS));
|
ZeroMemory(&ddsCaps,sizeof(DDSCAPS));
|
||||||
ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY; //set internally by DX anyway, dont think this any different than 0x0
|
ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM; // dont count AGP mem!
|
||||||
|
|
||||||
if (FAILED(hr = pDD2->GetAvailableVidMem(&ddsCaps,&dwTotal,&dwFree))) {
|
if (FAILED(hr = pDD2->GetAvailableVidMem(&ddsCaps,&dwTotal,&dwFree))) {
|
||||||
if (hr==DDERR_NODIRECTDRAWHW) {
|
if (hr==DDERR_NODIRECTDRAWHW) {
|
||||||
if (wgldisplay_cat.is_debug())
|
if (wgldisplay_cat.is_debug())
|
||||||
@ -474,9 +473,6 @@ void wglGraphicsWindow::config() {
|
|||||||
_props._yorg = 0;
|
_props._yorg = 0;
|
||||||
_props._xsize = dwWidth;
|
_props._xsize = dwWidth;
|
||||||
_props._ysize = dwHeight;
|
_props._ysize = dwHeight;
|
||||||
|
|
||||||
if (wgldisplay_cat.is_debug())
|
|
||||||
wgldisplay_cat.debug() << "set fullscreen mode at res (" << dwWidth << " X " << dwHeight << " X " << dwFullScreenBitDepth <<"), " << dm.dmDisplayFrequency << "Hz\n";
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
RECT win_rect;
|
RECT win_rect;
|
||||||
@ -510,6 +506,9 @@ void wglGraphicsWindow::config() {
|
|||||||
SetForegroundWindow(_mwindow);
|
SetForegroundWindow(_mwindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wgldisplay_cat.info() << "opening " << _props._xsize << "x" << _props._ysize
|
||||||
|
<< (_props._fullscreen ? " fullscreen" : " regular") << " window\n";
|
||||||
|
|
||||||
if (!_mwindow) {
|
if (!_mwindow) {
|
||||||
wgldisplay_cat.fatal() << "CreateWindow() failed!" << endl;
|
wgldisplay_cat.fatal() << "CreateWindow() failed!" << endl;
|
||||||
PrintErrorMessage(LAST_ERROR);
|
PrintErrorMessage(LAST_ERROR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user