Changeset 1502 for trunk/src/ddraw/OS2DDRAW.CPP
- Timestamp:
- Oct 29, 1999, 12:39:29 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2DDRAW.CPP
r1434 r1502 10 10 #define _OS2WIN_H 11 11 #define FAR 12 #include "misc.h"12 #include <misc.h> 13 13 #include <string.h> 14 14 #include <winreg.h> … … 113 113 if(lpGUID && *lpGUID == IID_IDirect3D) 114 114 { 115 WriteLog("D3D Interface\n");115 dprintf(("D3D Interface\n")); 116 116 117 117 lpVtbl = (IDirectDraw4Vtbl *)&Vtbl3D; … … 121 121 if(lpGUID && *lpGUID == IID_IDirectDraw4) 122 122 { 123 WriteLog("V4 Interface\n");123 dprintf(("V4 Interface\n")); 124 124 lpVtbl = &Vtbl4; 125 125 } 126 126 else 127 127 { 128 WriteLog("<V4 Interface\n");128 dprintf(("<V4 Interface\n")); 129 129 lpVtbl = (IDirectDraw4Vtbl *) &Vtbl; 130 130 } … … 142 142 if(rc) 143 143 { 144 WriteLog("ERROR: DiveOpen returned %d\n", rc);144 dprintf(("ERROR: DiveOpen returned %d\n", rc)); 145 145 lastError = DDERR_GENERIC; 146 146 hDive = NULL; … … 148 148 else 149 149 { 150 WriteLog("DiveOpen OK Framebuufer at 0x%08X\n",pFrameBuffer);150 dprintf(("DiveOpen OK Framebuufer at 0x%08X\n",pFrameBuffer)); 151 151 } 152 152 memset( &dCaps, … … 160 160 DIVE_BUFFER_SCREEN); 161 161 162 WriteLog("DiveQueryCaps rc=0x%08X\n",rc);162 dprintf(("DiveQueryCaps rc=0x%08X\n",rc)); 163 163 164 164 pdwUnknownData[235] = dCaps.ulHorizontalResolution; … … 201 201 OS2IDirectDraw *me = (OS2IDirectDraw *)This; 202 202 #ifdef DEBUG 203 WriteLog("OS2IDirectDraw::QueryInterface\n");203 dprintf(("OS2IDirectDraw::QueryInterface\n")); 204 204 #endif 205 205 … … 217 217 if(IsEqualGUID(riid, IID_IDirectDraw4)) 218 218 { 219 WriteLog("IID_IDirectDraw4 Interface\n");219 dprintf(("IID_IDirectDraw4 Interface\n")); 220 220 me->lpVtbl = &me->Vtbl4; 221 221 } 222 222 else 223 223 { 224 WriteLog("No IID_IDirectDraw4 Interface\n");224 dprintf(("No IID_IDirectDraw4 Interface\n")); 225 225 me->lpVtbl = (IDirectDraw4Vtbl *) &me->Vtbl; 226 226 } … … 237 237 238 238 #ifdef DEBUG 239 WriteLog("OS2IDirectDraw::AddRef %d\n", me->Referenced+1);239 dprintf(("OS2IDirectDraw::AddRef %d\n", me->Referenced+1)); 240 240 #endif 241 241 … … 250 250 251 251 #ifdef DEBUG 252 WriteLog("OS2IDirectDraw::Release %d\n", me->Referenced-1);253 WriteLog("OS2IDirectDraw::%X \n", me);252 dprintf(("OS2IDirectDraw::Release %d\n", me->Referenced-1)); 253 dprintf(("OS2IDirectDraw::%X \n", me)); 254 254 #endif 255 255 … … 276 276 { 277 277 #ifdef DEBUG 278 WriteLog("Compact\n");278 dprintf(("Compact\n")); 279 279 #endif 280 280 … … 292 292 293 293 #ifdef DEBUG 294 WriteLog("CreateClipper\n");294 dprintf(("CreateClipper\n")); 295 295 #endif 296 296 … … 348 348 { 349 349 #ifdef DEBUG 350 WriteLog("CreatePalette with %d colors\n", palsize);350 dprintf(("CreatePalette with %d colors\n", palsize)); 351 351 #endif 352 352 … … 385 385 386 386 #ifdef DEBUG 387 WriteLog("CreateSurface\n");388 WriteLog("dwSize %d\n", lpDDSurfaceDesc->dwSize);389 WriteLog("dwFlags %X\n", lpDDSurfaceDesc->dwFlags);390 WriteLog("dwHeight %d\n", lpDDSurfaceDesc->dwHeight);391 WriteLog("dwWidth %d\n", lpDDSurfaceDesc->dwWidth);392 WriteLog("lPitch %d\n", lpDDSurfaceDesc->lPitch);393 WriteLog("dwBackBufferCount %d\n", lpDDSurfaceDesc->dwBackBufferCount);394 WriteLog("dwMipMapCount %d\n", lpDDSurfaceDesc->dwMipMapCount);395 WriteLog("dwAlphaBitDepth %d\n", lpDDSurfaceDesc->dwAlphaBitDepth);396 WriteLog("ddsCaps.dwCaps %X\n", lpDDSurfaceDesc->ddsCaps.dwCaps);387 dprintf(("CreateSurface\n")); 388 dprintf(("dwSize %d\n", lpDDSurfaceDesc->dwSize)); 389 dprintf(("dwFlags %X\n", lpDDSurfaceDesc->dwFlags)); 390 dprintf(("dwHeight %d\n", lpDDSurfaceDesc->dwHeight)); 391 dprintf(("dwWidth %d\n", lpDDSurfaceDesc->dwWidth)); 392 dprintf(("lPitch %d\n", lpDDSurfaceDesc->lPitch)); 393 dprintf(("dwBackBufferCount %d\n", lpDDSurfaceDesc->dwBackBufferCount)); 394 dprintf(("dwMipMapCount %d\n", lpDDSurfaceDesc->dwMipMapCount)); 395 dprintf(("dwAlphaBitDepth %d\n", lpDDSurfaceDesc->dwAlphaBitDepth)); 396 dprintf(("ddsCaps.dwCaps %X\n", lpDDSurfaceDesc->ddsCaps.dwCaps)); 397 397 #endif 398 398 … … 408 408 if(rc != DD_OK) 409 409 { 410 WriteLog("Error createing Surface\n\n");410 dprintf(("Error createing Surface\n\n")); 411 411 *lplpDD = NULL; 412 412 delete newsurf; … … 415 415 *lplpDD = (IDirectDrawSurface *)newsurf; 416 416 417 WriteLog("New Surface created at %08X\n\n", newsurf);417 dprintf(("New Surface created at %08X\n\n", newsurf)); 418 418 } 419 419 … … 431 431 432 432 #ifdef DEBUG 433 WriteLog("CreateSurface4\n");434 WriteLog("dwSize %d\n", lpDDSurfaceDesc2->dwSize);435 WriteLog("dwHeight %d\n", lpDDSurfaceDesc2->dwHeight);436 WriteLog("dwWidth %d\n", lpDDSurfaceDesc2->dwWidth);437 WriteLog("lPitch %d\n", lpDDSurfaceDesc2->lPitch);438 WriteLog("dwBackBufferCount %d\n", lpDDSurfaceDesc2->dwBackBufferCount);439 WriteLog("dwMipMapCount %d\n", lpDDSurfaceDesc2->dwMipMapCount);440 WriteLog("dwAlphaBitDepth %d\n", lpDDSurfaceDesc2->dwAlphaBitDepth);441 WriteLog("ddsCaps.dwCaps %X\n", lpDDSurfaceDesc2->ddsCaps.dwCaps);433 dprintf(("CreateSurface4\n")); 434 dprintf(("dwSize %d\n", lpDDSurfaceDesc2->dwSize)); 435 dprintf(("dwHeight %d\n", lpDDSurfaceDesc2->dwHeight)); 436 dprintf(("dwWidth %d\n", lpDDSurfaceDesc2->dwWidth)); 437 dprintf(("lPitch %d\n", lpDDSurfaceDesc2->lPitch)); 438 dprintf(("dwBackBufferCount %d\n", lpDDSurfaceDesc2->dwBackBufferCount)); 439 dprintf(("dwMipMapCount %d\n", lpDDSurfaceDesc2->dwMipMapCount)); 440 dprintf(("dwAlphaBitDepth %d\n", lpDDSurfaceDesc2->dwAlphaBitDepth)); 441 dprintf(("ddsCaps.dwCaps %X\n", lpDDSurfaceDesc2->ddsCaps.dwCaps)); 442 442 #endif 443 443 … … 454 454 if(rc != DD_OK) 455 455 { 456 WriteLog("Error createing Surface\n\n");456 dprintf(("Error createing Surface\n\n")); 457 457 *lplpDD = NULL; 458 458 … … 462 462 *lplpDD = (IDirectDrawSurface4 *)newsurf; 463 463 464 WriteLog("New Surface created at %08X\n\n", newsurf);464 dprintf(("New Surface created at %08X\n\n", newsurf)); 465 465 } 466 466 … … 472 472 { 473 473 #ifdef DEBUG 474 WriteLog("DuplicateSurface NIY\n");474 dprintf(("DuplicateSurface NIY\n")); 475 475 #endif 476 476 return(DD_OK); … … 481 481 { 482 482 #ifdef DEBUG 483 WriteLog("DuplicateSurface4 NIY\n");483 dprintf(("DuplicateSurface4 NIY\n")); 484 484 #endif 485 485 … … 500 500 501 501 #ifdef DEBUG 502 WriteLog("EnumDisplayModes\n");502 dprintf(("EnumDisplayModes\n")); 503 503 #endif 504 504 … … 507 507 { 508 508 #ifdef DEBUG 509 WriteLog("EnumDisplayModes : Error NO EnumFunction passed in\n");509 dprintf(("EnumDisplayModes : Error NO EnumFunction passed in\n")); 510 510 #endif 511 511 … … 530 530 531 531 #ifdef DEBUG 532 WriteLog("EnumDisplayModes : DIVE modes\n");532 dprintf(("EnumDisplayModes : DIVE modes\n")); 533 533 #endif 534 534 … … 539 539 540 540 #ifdef DEBUG 541 WriteLog("EnumDisplayModes : ALL modes\n");541 dprintf(("EnumDisplayModes : ALL modes\n")); 542 542 #endif 543 543 … … 545 545 { 546 546 #ifdef DEBUG 547 WriteLog("EnumDisplayModes : STANDARDVGAMODES\n");547 dprintf(("EnumDisplayModes : STANDARDVGAMODES\n")); 548 548 #endif 549 549 DDSurfAct.dwHeight = ModesDive[0].iYRes; … … 554 554 { 555 555 #ifdef DEBUG 556 WriteLog("EnumDisplayModes : Enum done\n");556 dprintf(("EnumDisplayModes : Enum done\n")); 557 557 #endif 558 558 return (DD_OK); … … 597 597 } 598 598 #ifdef DEBUG 599 WriteLog("EnumDisplayModes : Enum Mode %dx%d @ %d\n",599 dprintf( ("EnumDisplayModes : Enum Mode %dx%d @ %d\n", 600 600 DDSurfAct.dwHeight, 601 601 DDSurfAct.dwWidth, 602 DDSurfAct.ddpfPixelFormat.dwRGBBitCount) ;602 DDSurfAct.ddpfPixelFormat.dwRGBBitCount)); 603 603 #endif 604 604 fCallAgain = lpDDEnumModesCallback(&DDSurfAct,lpContext); 605 605 #ifdef DEBUG 606 WriteLog("EnumDisplayModes : Callback returned with %d\n",607 fCallAgain) ;606 dprintf( ("EnumDisplayModes : Callback returned with %d\n", 607 fCallAgain)); 608 608 #endif 609 609 } … … 791 791 792 792 #ifdef DEBUG 793 WriteLog("EnumDisplayModes4 NIY\n");793 dprintf(("EnumDisplayModes4 NIY\n")); 794 794 #endif 795 795 return(DD_OK); … … 800 800 { 801 801 #ifdef DEBUG 802 WriteLog("EnumSurfaces NIY\n");802 dprintf(("EnumSurfaces NIY\n")); 803 803 #endif 804 804 … … 810 810 { 811 811 #ifdef DEBUG 812 WriteLog("EnumSurfaces4 NIY\n");812 dprintf(("EnumSurfaces4 NIY\n")); 813 813 #endif 814 814 … … 820 820 { 821 821 #ifdef DEBUG 822 WriteLog("FlipToGDISurface NIY\n");822 dprintf(("FlipToGDISurface NIY\n")); 823 823 #endif 824 824 … … 832 832 833 833 #ifdef DEBUG 834 WriteLog("DDGetCaps of ");834 dprintf(("DDGetCaps of ")); 835 835 #endif 836 836 … … 842 842 // Caller want Driver Caps 843 843 844 WriteLog("Driver\n");844 dprintf(("Driver\n")); 845 845 846 846 if( (sizeof(DDCAPS)!=lpDDDriverCaps->dwSize) && … … 848 848 (sizeof(DDCAPS_DX3)!=lpDDDriverCaps->dwSize) ) 849 849 { 850 WriteLog("Size %d Not supported ",851 lpDDDriverCaps->dwSize) ;850 dprintf( ("Size %d Not supported ", 851 lpDDDriverCaps->dwSize)); 852 852 return(DDERR_INVALIDPARAMS); 853 853 } … … 988 988 { 989 989 // Caller wants HEL Caps 990 WriteLog(" HEL\n");990 dprintf((" HEL\n")); 991 991 992 992 if(sizeof(DDCAPS)!=lpDDHELCaps->dwSize) 993 993 { 994 WriteLog("Size Not Set\n");994 dprintf(("Size Not Set\n")); 995 995 return(DDERR_INVALIDPARAMS); 996 996 } … … 1076 1076 OS2IDirectDraw *me = (OS2IDirectDraw *)This; 1077 1077 #ifdef DEBUG 1078 WriteLog("GetDisplayMode\n");1078 dprintf(("GetDisplayMode\n")); 1079 1079 #endif 1080 1080 … … 1179 1179 default: 1180 1180 #ifdef DEBUG 1181 WriteLog("Unsupported mode\n");1181 dprintf(("Unsupported mode\n")); 1182 1182 #endif 1183 1183 return(DDERR_UNSUPPORTEDMODE); … … 1192 1192 OS2IDirectDraw *me = (OS2IDirectDraw *)This; 1193 1193 #ifdef DEBUG 1194 WriteLog("GetDisplayMode\n");1194 dprintf(("GetDisplayMode\n")); 1195 1195 #endif 1196 1196 … … 1295 1295 default: 1296 1296 #ifdef DEBUG 1297 WriteLog("Unsupported mode\n");1297 dprintf(("Unsupported mode\n")); 1298 1298 #endif 1299 1299 return(DDERR_UNSUPPORTEDMODE); … … 1308 1308 DWORD dwFCC[3] = {FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3}; 1309 1309 #ifdef DEBUG 1310 WriteLog("GetFourCCCodes\n");1310 dprintf(("GetFourCCCodes\n")); 1311 1311 #endif 1312 1312 … … 1335 1335 { 1336 1336 #ifdef DEBUG 1337 WriteLog("GetGDISurface NYI\n");1337 dprintf(("GetGDISurface NYI\n")); 1338 1338 #endif 1339 1339 … … 1345 1345 { 1346 1346 #ifdef DEBUG 1347 WriteLog("GetGDISurface NYI\n");1347 dprintf(("GetGDISurface NYI\n")); 1348 1348 #endif 1349 1349 … … 1357 1357 DWORD dwFlags = DDWAITVB_BLOCKBEGIN; 1358 1358 #ifdef DEBUG 1359 WriteLog("GetMonitorFrequency\n");1359 dprintf(("GetMonitorFrequency\n")); 1360 1360 #endif 1361 1361 if(NULL==lpdwFreq) … … 1395 1395 BOOL bVertBlank; 1396 1396 #ifdef DEBUG 1397 WriteLog("GetScanLine\n");1397 dprintf(("GetScanLine\n")); 1398 1398 #endif 1399 1399 // ToDO find a way to get this position, so for now simply return DDERR_UNSUPPORTED … … 1419 1419 int rc; 1420 1420 #ifdef DEBUG 1421 WriteLog("GetVerticalBlankStatus\n");1421 dprintf(("GetVerticalBlankStatus\n")); 1422 1422 #endif 1423 1423 if(NULL==lpbIsInVB) … … 1444 1444 { 1445 1445 #ifdef DEBUG 1446 WriteLog("Initialize\n");1446 dprintf(("Initialize\n")); 1447 1447 #endif 1448 1448 … … 1454 1454 { 1455 1455 #ifdef DEBUG 1456 WriteLog("RestoreDisplayMod\n");1456 dprintf(("RestoreDisplayMod\n")); 1457 1457 #endif 1458 1458 … … 1466 1466 1467 1467 #ifdef DEBUG 1468 WriteLog("SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags);1468 dprintf(("SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags)); 1469 1469 #endif 1470 1470 … … 1487 1487 1488 1488 #ifdef DEBUG 1489 WriteLog("SetDisplayMode2 to %dx%d with %d bits colors\n", dwWidth, dwHeight, dwBPP);1489 dprintf(("SetDisplayMode2 to %dx%d with %d bits colors\n", dwWidth, dwHeight, dwBPP)); 1490 1490 #endif 1491 1491 … … 1525 1525 1526 1526 #ifdef DEBUG 1527 WriteLog("SetDisplayMode to %dx%d with %d bits colors\n", dwWidth, dwHeight, dwBPP);1527 dprintf(("SetDisplayMode to %dx%d with %d bits colors\n", dwWidth, dwHeight, dwBPP)); 1528 1528 #endif 1529 1529 me->screenwidth = dwWidth; … … 1560 1560 1561 1561 #ifdef DEBUG 1562 WriteLog("WaitForVerticalBlank\n");1562 dprintf(("WaitForVerticalBlank\n")); 1563 1563 #endif 1564 1564 … … 1613 1613 { 1614 1614 #ifdef DEBUG 1615 WriteLog("GetAvailableVidMem\n");1615 dprintf(("GetAvailableVidMem\n")); 1616 1616 #endif 1617 1617 … … 1638 1638 { 1639 1639 #ifdef DEBUG 1640 WriteLog("GetAvailableVidMem\n");1640 dprintf(("GetAvailableVidMem\n")); 1641 1641 #endif 1642 1642 … … 1662 1662 { 1663 1663 #ifdef DEBUG 1664 WriteLog("GetSurfaceFromDC NYI\n");1664 dprintf(("GetSurfaceFromDC NYI\n")); 1665 1665 #endif 1666 1666 … … 1672 1672 { 1673 1673 #ifdef DEBUG 1674 WriteLog("RestoreAllSurfaces\n");1674 dprintf(("RestoreAllSurfaces\n")); 1675 1675 #endif 1676 1676 … … 1682 1682 { 1683 1683 #ifdef DEBUG 1684 WriteLog("TestCooperativeLevel\n");1684 dprintf(("TestCooperativeLevel\n")); 1685 1685 #endif 1686 1686 … … 1693 1693 { 1694 1694 #ifdef DEBUG 1695 WriteLog("GetDeviceIdentifier Flags = %d\n",dwFlags);1695 dprintf(("GetDeviceIdentifier Flags = %d\n",dwFlags)); 1696 1696 #endif 1697 1697 if(NULL==lpdddi)
Note:
See TracChangeset
for help on using the changeset viewer.