Ignore:
Timestamp:
Aug 16, 1999, 2:40:48 AM (26 years ago)
Author:
hugh
Message:

Changed to use ODINCRT macros to preserve FS, but still does crash

File:
1 edited

Legend:

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

    r210 r503  
    22
    33#include <builtin.h>
     4#include <odincrt.h>
    45#define INITGUID
    56#include "os2ddraw.h"
     
    1819  HRESULT         rc;
    1920
     21  ODIN_FS_BEGIN
     22
    2023  WriteLog("DirectDrawCreate %X %X %X\n", lpGUID, lplpDD, pUnkOuter);
     24
    2125  newdraw = new OS2IDirectDraw(lpGUID);
    2226
    2327  if(newdraw == NULL)
    24     return(DDERR_NODIRECTDRAWHW);
    25 
    26 //  newdraw->Vtbl.AddRef((IDirectDraw *)newdraw);
    27   rc = newdraw->GetLastError();
    28   if(rc != DD_OK)
    2928  {
    30     *lplpDD = NULL;
    31     delete newdraw;
     29    rc = DDERR_NODIRECTDRAWHW;
    3230  }
    3331  else
    34     *lplpDD = (LPDIRECTDRAW)newdraw;
     32  {
     33    //  newdraw->Vtbl.AddRef((IDirectDraw *)newdraw);
     34    rc = newdraw->GetLastError();
     35    if(rc != DD_OK)
     36    {
     37      *lplpDD = NULL;
     38
     39      delete newdraw;
     40    }
     41    else
     42      *lplpDD = (LPDIRECTDRAW)newdraw;
     43  }
     44  ODIN_FS_END
    3545
    3646  return(rc);
     
    4555  //call it twice for the DirectDraw & Direct3D classes
    4656 if(lpCallback(NULL, "DIVE DirectDraw for OS/2",
    47                 "DirectDraw/2 v0.1", lpContext) == DDENUMRET_CANCEL)
     57                "DirectDraw/2 v0.2", lpContext) == DDENUMRET_CANCEL)
    4858  {
    4959    WriteLog("Cancel Callback\n");
     
    5464    WriteLog("Callback for 3Dfx Voodoo");
    5565    if(lpCallback((GUID *)&IID_IDirect3D, "3Dfx Voodoo Direct3D/2",
    56       "Direct3D/2 v0.1", lpContext) == DDENUMRET_CANCEL)
     66      "Direct3D/2 v0.2", lpContext) == DDENUMRET_CANCEL)
    5767    {
    5868      WriteLog("Cancel Callback\n");
     
    6474  return(DD_OK);
    6575}
     76
    6677//******************************************************************************
    6778typedef struct
Note: See TracChangeset for help on using the changeset viewer.