MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / check_libcef_version

Function check_libcef_version

core/src/libcef.cc:27–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27bool check_libcef_version(bool is_browser)
28{
29 void *libcef = dylib::find_lib(LIBCEF_MODULE_NAME);
30
31 if (libcef != nullptr)
32 {
33 auto get_version = reinterpret_cast<decltype(&cef_version_info)>(dylib::find_proc(libcef, "cef_version_info"));
34
35 // Check CEF version
36 if (get_version == nullptr || get_version(0) != CEF_VERSION_MAJOR)
37 {
38 if (is_browser)
39 dialog::alert("Pengu does not support your Client version.", "Pengu Loader");
40 return false;
41 }
42
43 if (is_browser)
44 fix_browser_background((const void *)get_version);
45
46 return true;
47 }
48 else
49 {
50 if (is_browser)
51 dialog::alert("Failed to load Chromium Embedded Framework.", "Pengu Loader");
52 return false;
53 }
54}

Callers 2

InitializeFunction · 0.85
dllmainFunction · 0.85

Calls 2

alertFunction · 0.85
fix_browser_backgroundFunction · 0.85

Tested by

no test coverage detected