Ignore:
Timestamp:
Oct 29, 1999, 12:39:29 AM (26 years ago)
Author:
hugh
Message:

Changed to put logging info back to common logfile odin32_x.log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2DDRAW.CPP

    r1434 r1502  
    1010#define _OS2WIN_H
    1111#define FAR
    12 #include "misc.h"
     12#include <misc.h>
    1313#include <string.h>
    1414#include <winreg.h>
     
    113113  if(lpGUID && *lpGUID == IID_IDirect3D)
    114114  {
    115     WriteLog("D3D Interface\n");
     115    dprintf(("D3D Interface\n"));
    116116
    117117    lpVtbl = (IDirectDraw4Vtbl *)&Vtbl3D;
     
    121121    if(lpGUID && *lpGUID == IID_IDirectDraw4)
    122122    {
    123       WriteLog("V4 Interface\n");
     123      dprintf(("V4 Interface\n"));
    124124      lpVtbl = &Vtbl4;
    125125    }
    126126    else
    127127    {
    128       WriteLog("<V4 Interface\n");
     128      dprintf(("<V4 Interface\n"));
    129129      lpVtbl = (IDirectDraw4Vtbl *) &Vtbl;
    130130    }
     
    142142  if(rc)
    143143  {
    144     WriteLog("ERROR: DiveOpen returned %d\n", rc);
     144    dprintf(("ERROR: DiveOpen returned %d\n", rc));
    145145    lastError = DDERR_GENERIC;
    146146    hDive     = NULL;
     
    148148  else
    149149  {
    150     WriteLog("DiveOpen OK Framebuufer at 0x%08X\n",pFrameBuffer);
     150    dprintf(("DiveOpen OK Framebuufer at 0x%08X\n",pFrameBuffer));
    151151  }
    152152  memset( &dCaps,
     
    160160                      DIVE_BUFFER_SCREEN);
    161161
    162   WriteLog("DiveQueryCaps rc=0x%08X\n",rc);
     162  dprintf(("DiveQueryCaps rc=0x%08X\n",rc));
    163163
    164164  pdwUnknownData[235] = dCaps.ulHorizontalResolution;
     
    201201 OS2IDirectDraw *me = (OS2IDirectDraw *)This;
    202202  #ifdef DEBUG
    203     WriteLog("OS2IDirectDraw::QueryInterface\n");
     203    dprintf(("OS2IDirectDraw::QueryInterface\n"));
    204204  #endif
    205205
     
    217217  if(IsEqualGUID(riid, IID_IDirectDraw4))
    218218  {
    219     WriteLog("IID_IDirectDraw4 Interface\n");
     219    dprintf(("IID_IDirectDraw4 Interface\n"));
    220220    me->lpVtbl = &me->Vtbl4;
    221221  }
    222222  else
    223223  {
    224     WriteLog("No IID_IDirectDraw4 Interface\n");
     224    dprintf(("No IID_IDirectDraw4 Interface\n"));
    225225    me->lpVtbl = (IDirectDraw4Vtbl *) &me->Vtbl;
    226226  }
     
    237237
    238238  #ifdef DEBUG
    239     WriteLog("OS2IDirectDraw::AddRef %d\n", me->Referenced+1);
     239    dprintf(("OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
    240240  #endif
    241241
     
    250250
    251251  #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));
    254254  #endif
    255255
     
    276276{
    277277  #ifdef DEBUG
    278     WriteLog("Compact\n");
     278    dprintf(("Compact\n"));
    279279  #endif
    280280
     
    292292
    293293  #ifdef DEBUG
    294     WriteLog("CreateClipper\n");
     294    dprintf(("CreateClipper\n"));
    295295  #endif
    296296
     
    348348  {
    349349    #ifdef DEBUG
    350       WriteLog("CreatePalette with %d colors\n", palsize);
     350      dprintf(("CreatePalette with %d colors\n", palsize));
    351351    #endif
    352352
     
    385385
    386386  #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));
    397397  #endif
    398398
     
    408408    if(rc != DD_OK)
    409409    {
    410       WriteLog("Error createing Surface\n\n");
     410      dprintf(("Error createing Surface\n\n"));
    411411      *lplpDD = NULL;
    412412      delete newsurf;
     
    415415      *lplpDD = (IDirectDrawSurface *)newsurf;
    416416
    417     WriteLog("New Surface created at %08X\n\n", newsurf);
     417    dprintf(("New Surface created at %08X\n\n", newsurf));
    418418  }
    419419
     
    431431
    432432  #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));
    442442  #endif
    443443
     
    454454    if(rc != DD_OK)
    455455    {
    456       WriteLog("Error createing Surface\n\n");
     456      dprintf(("Error createing Surface\n\n"));
    457457      *lplpDD = NULL;
    458458
     
    462462      *lplpDD = (IDirectDrawSurface4 *)newsurf;
    463463
    464     WriteLog("New Surface created at %08X\n\n", newsurf);
     464    dprintf(("New Surface created at %08X\n\n", newsurf));
    465465  }
    466466
     
    472472{
    473473  #ifdef DEBUG
    474     WriteLog("DuplicateSurface NIY\n");
     474    dprintf(("DuplicateSurface NIY\n"));
    475475  #endif
    476476  return(DD_OK);
     
    481481{
    482482  #ifdef DEBUG
    483     WriteLog("DuplicateSurface4 NIY\n");
     483    dprintf(("DuplicateSurface4 NIY\n"));
    484484  #endif
    485485
     
    500500
    501501  #ifdef DEBUG
    502     WriteLog("EnumDisplayModes\n");
     502    dprintf(("EnumDisplayModes\n"));
    503503  #endif
    504504
     
    507507  {
    508508    #ifdef DEBUG
    509       WriteLog("EnumDisplayModes : Error NO EnumFunction passed in\n");
     509      dprintf(("EnumDisplayModes : Error NO EnumFunction passed in\n"));
    510510    #endif
    511511
     
    530530
    531531    #ifdef DEBUG
    532       WriteLog("EnumDisplayModes : DIVE modes\n");
     532      dprintf(("EnumDisplayModes : DIVE modes\n"));
    533533    #endif
    534534
     
    539539
    540540      #ifdef DEBUG
    541         WriteLog("EnumDisplayModes : ALL modes\n");
     541        dprintf(("EnumDisplayModes : ALL modes\n"));
    542542      #endif
    543543
     
    545545      {
    546546        #ifdef DEBUG
    547           WriteLog("EnumDisplayModes : STANDARDVGAMODES\n");
     547          dprintf(("EnumDisplayModes : STANDARDVGAMODES\n"));
    548548        #endif
    549549        DDSurfAct.dwHeight = ModesDive[0].iYRes;
     
    554554        {
    555555          #ifdef DEBUG
    556             WriteLog("EnumDisplayModes : Enum done\n");
     556            dprintf(("EnumDisplayModes : Enum done\n"));
    557557          #endif
    558558          return (DD_OK);
     
    597597          }
    598598          #ifdef DEBUG
    599             WriteLog( "EnumDisplayModes : Enum Mode %dx%d @ %d\n",
     599            dprintf( ("EnumDisplayModes : Enum Mode %dx%d @ %d\n",
    600600                      DDSurfAct.dwHeight,
    601601                      DDSurfAct.dwWidth,
    602                       DDSurfAct.ddpfPixelFormat.dwRGBBitCount);
     602                      DDSurfAct.ddpfPixelFormat.dwRGBBitCount));
    603603          #endif
    604604          fCallAgain = lpDDEnumModesCallback(&DDSurfAct,lpContext);
    605605          #ifdef DEBUG
    606             WriteLog( "EnumDisplayModes : Callback returned with %d\n",
    607                       fCallAgain);
     606            dprintf( ("EnumDisplayModes : Callback returned with %d\n",
     607                      fCallAgain));
    608608          #endif
    609609        }
     
    791791
    792792  #ifdef DEBUG
    793     WriteLog("EnumDisplayModes4 NIY\n");
     793    dprintf(("EnumDisplayModes4 NIY\n"));
    794794  #endif
    795795  return(DD_OK);
     
    800800{
    801801  #ifdef DEBUG
    802     WriteLog("EnumSurfaces NIY\n");
     802    dprintf(("EnumSurfaces NIY\n"));
    803803  #endif
    804804
     
    810810{
    811811  #ifdef DEBUG
    812     WriteLog("EnumSurfaces4 NIY\n");
     812    dprintf(("EnumSurfaces4 NIY\n"));
    813813  #endif
    814814
     
    820820{
    821821  #ifdef DEBUG
    822     WriteLog("FlipToGDISurface NIY\n");
     822    dprintf(("FlipToGDISurface NIY\n"));
    823823  #endif
    824824
     
    832832
    833833  #ifdef DEBUG
    834     WriteLog("DDGetCaps of ");
     834    dprintf(("DDGetCaps of "));
    835835  #endif
    836836
     
    842842    // Caller want Driver Caps
    843843
    844     WriteLog("Driver\n");
     844    dprintf(("Driver\n"));
    845845
    846846    if( (sizeof(DDCAPS)!=lpDDDriverCaps->dwSize)     &&
     
    848848        (sizeof(DDCAPS_DX3)!=lpDDDriverCaps->dwSize) )
    849849    {
    850       WriteLog( "Size %d Not supported ",
    851                 lpDDDriverCaps->dwSize);
     850      dprintf( ("Size %d Not supported ",
     851                lpDDDriverCaps->dwSize));
    852852      return(DDERR_INVALIDPARAMS);
    853853    }
     
    988988  {
    989989    // Caller wants HEL Caps
    990     WriteLog(" HEL\n");
     990    dprintf((" HEL\n"));
    991991
    992992    if(sizeof(DDCAPS)!=lpDDHELCaps->dwSize)
    993993    {
    994       WriteLog("Size Not Set\n");
     994      dprintf(("Size Not Set\n"));
    995995      return(DDERR_INVALIDPARAMS);
    996996    }
     
    10761076  OS2IDirectDraw        *me = (OS2IDirectDraw *)This;
    10771077  #ifdef DEBUG
    1078     WriteLog("GetDisplayMode\n");
     1078    dprintf(("GetDisplayMode\n"));
    10791079  #endif
    10801080
     
    11791179    default:
    11801180      #ifdef DEBUG
    1181         WriteLog("Unsupported mode\n");
     1181        dprintf(("Unsupported mode\n"));
    11821182      #endif
    11831183      return(DDERR_UNSUPPORTEDMODE);
     
    11921192  OS2IDirectDraw        *me = (OS2IDirectDraw *)This;
    11931193  #ifdef DEBUG
    1194     WriteLog("GetDisplayMode\n");
     1194    dprintf(("GetDisplayMode\n"));
    11951195  #endif
    11961196
     
    12951295    default:
    12961296      #ifdef DEBUG
    1297         WriteLog("Unsupported mode\n");
     1297        dprintf(("Unsupported mode\n"));
    12981298      #endif
    12991299      return(DDERR_UNSUPPORTEDMODE);
     
    13081308  DWORD dwFCC[3] = {FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3};
    13091309  #ifdef DEBUG
    1310     WriteLog("GetFourCCCodes\n");
     1310    dprintf(("GetFourCCCodes\n"));
    13111311  #endif
    13121312
     
    13351335{
    13361336  #ifdef DEBUG
    1337     WriteLog("GetGDISurface NYI\n");
     1337    dprintf(("GetGDISurface NYI\n"));
    13381338  #endif
    13391339
     
    13451345{
    13461346  #ifdef DEBUG
    1347     WriteLog("GetGDISurface NYI\n");
     1347    dprintf(("GetGDISurface NYI\n"));
    13481348  #endif
    13491349
     
    13571357  DWORD dwFlags = DDWAITVB_BLOCKBEGIN;
    13581358  #ifdef DEBUG
    1359     WriteLog("GetMonitorFrequency\n");
     1359    dprintf(("GetMonitorFrequency\n"));
    13601360  #endif
    13611361  if(NULL==lpdwFreq)
     
    13951395  BOOL bVertBlank;
    13961396  #ifdef DEBUG
    1397     WriteLog("GetScanLine\n");
     1397    dprintf(("GetScanLine\n"));
    13981398  #endif
    13991399  // ToDO find a way to get this position, so for now simply return DDERR_UNSUPPORTED
     
    14191419  int rc;
    14201420  #ifdef DEBUG
    1421     WriteLog("GetVerticalBlankStatus\n");
     1421    dprintf(("GetVerticalBlankStatus\n"));
    14221422  #endif
    14231423  if(NULL==lpbIsInVB)
     
    14441444{
    14451445  #ifdef DEBUG
    1446     WriteLog("Initialize\n");
     1446    dprintf(("Initialize\n"));
    14471447  #endif
    14481448
     
    14541454{
    14551455  #ifdef DEBUG
    1456     WriteLog("RestoreDisplayMod\n");
     1456    dprintf(("RestoreDisplayMod\n"));
    14571457  #endif
    14581458
     
    14661466
    14671467  #ifdef DEBUG
    1468     WriteLog("SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags);
     1468    dprintf(("SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags));
    14691469  #endif
    14701470
     
    14871487
    14881488  #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));
    14901490  #endif
    14911491
     
    15251525
    15261526#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));
    15281528#endif
    15291529  me->screenwidth  = dwWidth;
     
    15601560
    15611561  #ifdef DEBUG
    1562     WriteLog("WaitForVerticalBlank\n");
     1562    dprintf(("WaitForVerticalBlank\n"));
    15631563  #endif
    15641564
     
    16131613{
    16141614  #ifdef DEBUG
    1615     WriteLog("GetAvailableVidMem\n");
     1615    dprintf(("GetAvailableVidMem\n"));
    16161616  #endif
    16171617
     
    16381638{
    16391639  #ifdef DEBUG
    1640     WriteLog("GetAvailableVidMem\n");
     1640    dprintf(("GetAvailableVidMem\n"));
    16411641  #endif
    16421642
     
    16621662{
    16631663  #ifdef DEBUG
    1664     WriteLog("GetSurfaceFromDC NYI\n");
     1664    dprintf(("GetSurfaceFromDC NYI\n"));
    16651665  #endif
    16661666
     
    16721672{
    16731673  #ifdef DEBUG
    1674     WriteLog("RestoreAllSurfaces\n");
     1674    dprintf(("RestoreAllSurfaces\n"));
    16751675  #endif
    16761676
     
    16821682{
    16831683  #ifdef DEBUG
    1684     WriteLog("TestCooperativeLevel\n");
     1684    dprintf(("TestCooperativeLevel\n"));
    16851685  #endif
    16861686
     
    16931693{
    16941694  #ifdef DEBUG
    1695     WriteLog("GetDeviceIdentifier Flags = %d\n",dwFlags);
     1695    dprintf(("GetDeviceIdentifier Flags = %d\n",dwFlags));
    16961696  #endif
    16971697  if(NULL==lpdddi)
Note: See TracChangeset for help on using the changeset viewer.