Changeset 4137 for trunk/src


Ignore:
Timestamp:
Aug 31, 2000, 10:51:57 PM (25 years ago)
Author:
sandervl
Message:

DirectDrawCreate change/fix

File:
1 edited

Legend:

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

    r4135 r4137  
    1 /* $Id: ddraw.CPP,v 1.13 2000-08-31 12:48:42 sandervl Exp $ */
     1/* $Id: ddraw.CPP,v 1.14 2000-08-31 20:51:57 sandervl Exp $ */
    22
    33/*
     
    66 * Copyright 1998 Sander va Leeuwen
    77 * Copyright 1999 Markus Montkowski
     8 *
     9 * WARNING: DirectDrawCreate defaults to ddraw v4 if lpGUID == NULL!!
     10 *
    811 *
    912 * Project Odin Software License can be found in LICENSE.TXT
     
    4548  else
    4649  {
    47     newdraw->Vtbl.AddRef((IDirectDraw2 *)newdraw);
     50    if(!lpGUID) {
     51         //WARNING: defaults to ddraw v4
     52         newdraw->Vtbl.QueryInterface((IDirectDraw2 *)newdraw, &IID_IDirectDraw4, (LPVOID *)lplpDD);
     53    }
     54    else newdraw->Vtbl.QueryInterface((IDirectDraw2 *)newdraw, lpGUID, (LPVOID *)lplpDD);
     55
    4856    rc = newdraw->GetLastError();
    4957    if(rc != DD_OK)
     
    5361      delete newdraw;
    5462    }
    55     else
    56       *lplpDD = (LPDIRECTDRAW)newdraw;
    5763  }
    5864  return(rc);
Note: See TracChangeset for help on using the changeset viewer.