hocclk: fix compilation
This commit is contained in:
@@ -261,10 +261,10 @@ static inline const char* hocclkFormatConfigValue(HocClkConfigValue val, bool pr
|
|||||||
return pretty ? "Display Voltage" : "display_voltage";
|
return pretty ? "Display Voltage" : "display_voltage";
|
||||||
|
|
||||||
case HocClkConfigValue_MemoryFrequencyMeasurementMode:
|
case HocClkConfigValue_MemoryFrequencyMeasurementMode:
|
||||||
return pretty ? "Memory Frequency Measurement Mode" : "mem_freq_measurement_mode";
|
return pretty ? "RAM Frequency Measurement Mode" : "mem_freq_measurement_mode";
|
||||||
|
|
||||||
case HocClkConfigValue_RamDisplayUnit:
|
case HocClkConfigValue_RamDisplayUnit:
|
||||||
return pretty ? "Memory Frequency Display Unit" : "mem_display_unit";
|
return pretty ? "RAM Frequency Display Unit" : "RAM_display_unit";
|
||||||
|
|
||||||
// KIP config values
|
// KIP config values
|
||||||
case KipConfigValue_custRev:
|
case KipConfigValue_custRev:
|
||||||
|
|||||||
@@ -230,15 +230,15 @@ void BaseMenuGui::refresh()
|
|||||||
sprintf(displayStrings[3], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
sprintf(displayStrings[3], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||||
|
|
||||||
hz = context->freqs[HocClkModule_MEM]; // MEM
|
hz = context->freqs[HocClkModule_MEM]; // MEM
|
||||||
std::uint32_t unit = configList.values[HocClkConfigValue_MemDisplayUnit];
|
std::uint32_t unit = configList.values[HocClkConfigValue_RamDisplayUnit];
|
||||||
std::uint32_t mhz = hz / 1000000U;
|
std::uint32_t mhz = hz / 1000000U;
|
||||||
std::uint32_t mts = mhz * 2;
|
std::uint32_t mts = mhz * 2;
|
||||||
std::uint32_t tenth = (hz / 100000U) % 10U;
|
std::uint32_t tenth = (hz / 100000U) % 10U;
|
||||||
if(unit == MemDisplayUnit_MTs)
|
if(unit == RamDisplayUnit_MTs)
|
||||||
sprintf(displayStrings[4], "%u MT/s", mts);
|
sprintf(displayStrings[4], "%u MT/s", mts);
|
||||||
else if(unit == MemDisplayUnit_MHz)
|
else if(unit == RamDisplayUnit_MHz)
|
||||||
sprintf(displayStrings[4], "%u.%u MHz", mhz, tenth);
|
sprintf(displayStrings[4], "%u.%u MHz", mhz, tenth);
|
||||||
else if(unit == MemDisplayUnit_Both) {
|
else if(unit == RamDisplayUnit_MHzMTs) {
|
||||||
hz = context->realFreqs[HocClkModule_MEM];
|
hz = context->realFreqs[HocClkModule_MEM];
|
||||||
mhz = hz / 1000000U;
|
mhz = hz / 1000000U;
|
||||||
tenth = (hz / 100000U) % 10U;
|
tenth = (hz / 100000U) % 10U;
|
||||||
@@ -253,11 +253,11 @@ void BaseMenuGui::refresh()
|
|||||||
sprintf(displayStrings[6], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
sprintf(displayStrings[6], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||||
|
|
||||||
hz = context->realFreqs[HocClkModule_MEM]; // MEM
|
hz = context->realFreqs[HocClkModule_MEM]; // MEM
|
||||||
unit = configList.values[HocClkConfigValue_MemDisplayUnit];
|
unit = configList.values[HocClkConfigValue_RamDisplayUnit];
|
||||||
mhz = hz / 1000000U;
|
mhz = hz / 1000000U;
|
||||||
mts = mhz * 2;
|
mts = mhz * 2;
|
||||||
tenth = (hz / 100000U) % 10U;
|
tenth = (hz / 100000U) % 10U;
|
||||||
if(unit == MemDisplayUnit_MTs || unit == MemDisplayUnit_Both)
|
if(unit == RamDisplayUnit_MTs || unit == RamDisplayUnit_MHzMTs)
|
||||||
sprintf(displayStrings[7], "%u MT/s", mts);
|
sprintf(displayStrings[7], "%u MT/s", mts);
|
||||||
else
|
else
|
||||||
sprintf(displayStrings[7], "%u.%u MHz", mhz, tenth);
|
sprintf(displayStrings[7], "%u.%u MHz", mhz, tenth);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ tsl::elm::ListItem* FreqChoiceGui::createFreqListItem(std::uint32_t hz, bool sel
|
|||||||
{
|
{
|
||||||
std::string text;
|
std::string text;
|
||||||
if(module == HocClkModule_MEM)
|
if(module == HocClkModule_MEM)
|
||||||
text = formatListFreqHzMem(hz, (MemDisplayUnit)this->configList->values[HocClkConfigValue_MemDisplayUnit]);
|
text = formatListFreqHzMem(hz, (RamDisplayUnit)this->configList->values[HocClkConfigValue_RamDisplayUnit]);
|
||||||
else
|
else
|
||||||
text = formatListFreqHz(hz);
|
text = formatListFreqHz(hz);
|
||||||
|
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ void GlobalOverrideGui::addModuleListItem(HocClkModule module)
|
|||||||
{
|
{
|
||||||
tsl::elm::ListItem *listItem =
|
tsl::elm::ListItem *listItem =
|
||||||
new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
||||||
MemDisplayUnit memUnit = (MemDisplayUnit)configList.values[HocClkConfigValue_MemDisplayUnit];
|
RamDisplayUnit memUnit = (RamDisplayUnit)configList.values[HocClkConfigValue_RamDisplayUnit];
|
||||||
listItem->setValue(module == HocClkModule_MEM ? formatListFreqMem(0, memUnit) : formatListFreqMHz(0));
|
listItem->setValue(module == HocClkModule_MEM ? formatListFreqMem(0, memUnit) : formatListFreqMHz(0));
|
||||||
listItem->setClickListener([this, module](u64 keys) {
|
listItem->setClickListener([this, module](u64 keys) {
|
||||||
if ((keys & HidNpadButton_A) == HidNpadButton_A) {
|
if ((keys & HidNpadButton_A) == HidNpadButton_A) {
|
||||||
@@ -263,7 +263,7 @@ void GlobalOverrideGui::addModuleListItem(HocClkModule module)
|
|||||||
this->context->overrideFreqs[module] = 0;
|
this->context->overrideFreqs[module] = 0;
|
||||||
this->listHz[module] = 0;
|
this->listHz[module] = 0;
|
||||||
|
|
||||||
this->listItems[module]->setValue(module == HocClkModule_MEM ? formatListFreqMem(0, (MemDisplayUnit)configList.values[HocClkConfigValue_MemDisplayUnit]) : formatListFreqHz(0));
|
this->listItems[module]->setValue(module == HocClkModule_MEM ? formatListFreqMem(0, (RamDisplayUnit)configList.values[HocClkConfigValue_RamDisplayUnit]) : formatListFreqHz(0));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -411,7 +411,7 @@ void GlobalOverrideGui::refresh()
|
|||||||
} else {
|
} else {
|
||||||
this->listItems[m]->setValue(
|
this->listItems[m]->setValue(
|
||||||
m == HocClkModule_MEM
|
m == HocClkModule_MEM
|
||||||
? formatListFreqHzMem(this->context->overrideFreqs[m], (MemDisplayUnit)configList.values[HocClkConfigValue_MemDisplayUnit])
|
? formatListFreqHzMem(this->context->overrideFreqs[m], (RamDisplayUnit)configList.values[HocClkConfigValue_RamDisplayUnit])
|
||||||
: formatListFreqHz(this->context->overrideFreqs[m]));
|
: formatListFreqHz(this->context->overrideFreqs[m]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user