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

Function fix_browser_background

core/src/libcef.cc:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11static void fix_browser_background(const void *rladdr)
12{
13#if OS_WIN
14 const char *pattern = "41 83 F8 01 74 0B 41 83 F8 02 75 0A 45 31 C0";
15#elif OS_MAC
16 const char *pattern = "55 48 89 E5 83 FA 01 74 ?? 83 FA 02 75 ??";
17#endif
18 using Fn = decltype(&get_background_color);
19 static hook::Hook<Fn> GetBackgroundColor;
20 // Find CefContext::GetBackgroundColor()
21 auto func = reinterpret_cast<Fn>(dylib::find_memory(rladdr, pattern));
22
23 if (func != nullptr)
24 GetBackgroundColor.hook(func, get_background_color);
25}
26
27bool check_libcef_version(bool is_browser)
28{

Callers 1

check_libcef_versionFunction · 0.85

Calls 1

hookMethod · 0.80

Tested by

no test coverage detected