Ignore:
Timestamp:
Jan 21, 2003, 12:20:36 PM (23 years ago)
Author:
sandervl
Message:

Removed dependency on dive.dll. Load it on demand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/initterm.cpp

    r6646 r9698  
    1 /* $Id: initterm.cpp,v 1.19 2001-09-05 12:50:39 bird Exp $
     1/* $Id: initterm.cpp,v 1.20 2003-01-21 11:20:35 sandervl Exp $
    22 *
    33 * DLL entry point
     
    4040
    4141
    42 extern "C" {
    43  //Win32 resource table (produced by wrc)
    44  extern DWORD _Resource_PEResTab;
    45 }
    46 
    47 char ddrawPath[CCHMAXPATH] = "";
    48 static HMODULE dllHandle = 0;
    49 
    5042static void APIENTRY cleanup(ULONG ulReason);
    5143
     
    8274                                   ulFlag)
    8375{
     76   APIRET rc;
    8477
    8578   /*-------------------------------------------------------------------------*/
     
    9285      case 0 :
    9386      {
    94          APIRET rc;
    95 
    9687#ifdef __IBMCPP__
    9788         ctordtorInit();
    9889#endif
    99          DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);
    100          char *endofpath = strrchr(ddrawPath, '\\');
    101          if (endofpath)
    102             *(endofpath+1) = '\0';
    10390
    104          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    105 
    106          dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab,
    107                                    DDRAW_MAJORIMAGE_VERSION, DDRAW_MINORIMAGE_VERSION,
    108                                    IMAGE_SUBSYSTEM_WINDOWS_GUI);
    109          if (dllHandle == 0)
    110             return 0UL;
    111 
     91#ifdef FULLSCREEN_DDRAW
    11292         rc = DosExitList(EXITLIST_NONCOREDLL | EXLST_ADD, cleanup);
    11393         if (rc)
    11494            return 0UL;
     95#endif
    11596
     97         rc = inittermDDraw(hModule, ulFlag);
    11698         break;
    11799      }
    118100      case 1 :
    119          if(dllHandle) {
    120             UnregisterLxDll(dllHandle);
    121          }
     101#ifdef __IBMCPP__
     102         ctordtorTerm();
     103#endif
     104         
     105         rc = inittermDDraw(hModule, ulFlag);
    122106         break;
    123107      default  :
     
    128112   /* A non-zero value must be returned to indicate success.  */
    129113   /***********************************************************/
    130    return 1UL;
     114   return rc;
    131115}
    132116//******************************************************************************
    133117//******************************************************************************
    134 
     118#ifdef FULLSCREEN_DDRAW
    135119static void APIENTRY cleanup(ULONG ulReason)
    136120{
     
    143127//******************************************************************************
    144128//******************************************************************************
     129#endif
Note: See TracChangeset for help on using the changeset viewer.