MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ProcessGlu32DLL

Function ProcessGlu32DLL

legacy/D3Launch/D3Launch.cpp:680–697  ·  view source on GitHub ↗

Function to see if user needs Glu32.dll

Source from the content-addressed store, hash-verified

678
679// Function to see if user needs Glu32.dll
680bool ProcessGlu32DLL(void) {
681 // First, see if Glu32.xyz is even in the directory
682 if (_access("Glu32.xyz", 0) == -1)
683 return FALSE;
684
685 // Second, see if user's system already has access to a Glu32.dll
686 HINSTANCE dll_handle;
687 dll_handle = LoadLibrary("Glu32.dll");
688 if (dll_handle != NULL) {
689 FreeLibrary(dll_handle);
690 DeleteFile("Glu32.xyz");
691 return FALSE;
692 }
693
694 // Ok, user doesn't have it, so rename ours
695 rename("Glu32.xyz", "Glu32.dll");
696 return TRUE;
697}
698
699// Checks to see if a new version text file exists (such a file should
700// only be created if the user does a manual patch update). If one is

Callers 1

InitInstanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected