need to test nformats

This commit is contained in:
David Rose 2004-12-30 01:15:42 +00:00
parent 837a93bad5
commit 943f213dbb
2 changed files with 4 additions and 2 deletions

View File

@ -377,7 +377,8 @@ make_pbuffer(HDC twindow_dc) {
memset(pformat, 0, sizeof(pformat));
unsigned int nformats = 0;
if (!wglgsg->_wglChoosePixelFormatARB(twindow_dc, iattrib_list, fattrib_list,
max_pformats, pformat, &nformats)) {
max_pformats, pformat, &nformats)
|| nformats == 0) {
wgldisplay_cat.info()
<< "Couldn't find a suitable pixel format for creating a pbuffer.\n";
return false;

View File

@ -370,7 +370,8 @@ choose_pfnum_advanced(const FrameBufferProperties &properties,
memset(pformat, 0, sizeof(pformat));
unsigned int nformats = 0;
if (!wglgsg->_wglChoosePixelFormatARB(window_dc, iattrib_list, fattrib_list,
max_pformats, pformat, &nformats)) {
max_pformats, pformat, &nformats) ||
nformats == 0) {
wgldisplay_cat.info()
<< "Couldn't find a suitable advanced pixel format.\n";
return orig_pfnum;