MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LoadD3D9Library

Function LoadD3D9Library

src/Graphics_D3D9.c:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52static IDirect3D9* (WINAPI *_Direct3DCreate9)(UINT SDKVersion);
53
54static void LoadD3D9Library(void) {
55 static const struct DynamicLibSym funcs[] = {
56 DynamicLib_ReqSym(Direct3DCreate9)
57 };
58 static const cc_string path = String_FromConst("d3d9.dll");
59 void* lib;
60 DynamicLib_LoadAll(&path, funcs, Array_Elems(funcs), &lib);
61
62 if (lib) return;
63 Logger_FailToStart("Failed to load d3d9.dll. You may need to install Direct3D9.");
64}
65
66static void CreateD3D9Instance(void) {
67 int ver = D3D_SDK_VERSION;

Callers 1

Gfx_CreateFunction · 0.85

Calls 2

DynamicLib_LoadAllFunction · 0.85
Logger_FailToStartFunction · 0.85

Tested by

no test coverage detected