MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / OpenProcessorKey

Function OpenProcessorKey

Source/Windows/Common/CPUFeatures.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace {
14
15HKEY OpenProcessorKey(uint32_t Idx) {
16 HKEY Out;
17 auto Path = fextl::fmt::format("Hardware\\Description\\System\\CentralProcessor\\{}", Idx);
18 if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, Path.c_str(), 0, KEY_READ, &Out)) {
19 return nullptr;
20 }
21 return Out;
22}
23
24uint64_t ReadRegU64(HKEY Key, const char* Name) {
25 uint64_t Value = 0;

Callers 1

FetchHostFeaturesMethod · 0.85

Calls 1

formatFunction · 0.85

Tested by

no test coverage detected