sysclk - start minimal integrations

This commit is contained in:
souldbminersmwc
2026-01-04 19:04:18 -05:00
parent 2b883a9279
commit 33c49aac86
13 changed files with 110 additions and 22 deletions

View File

@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023 KazushiMe
* Licensed under the GPLv2
*/
#pragma once
#include <switch.h>

View File

@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023 KazushiMe
* Licensed under the GPLv2
*/
#include "i2c.h"
Result I2cSet_U8(I2cDevice dev, u8 reg, u8 val) {

View File

@@ -25,6 +25,7 @@ SOURCES := src src/ui/gui src/ui/elements ../common/src ../common/src/client
DATA := data
INCLUDES := ../common/include
EXEFS_SRC := exefs_src
IS_MINIMAL := 0
APP_TITLE := Horizon OC
NO_ICON := 1

View File

@@ -271,12 +271,14 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
this->addModuleListItem(profile, SysClkModule_CPU);
this->addModuleListItem(profile, SysClkModule_GPU);
this->addModuleListItem(profile, SysClkModule_MEM);
if(!IsHoag()) {
if(profile != SysClkProfile_Docked)
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0);
else
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 5, " Hz", 1, 0);
}
#ifndef IS_MINIMAL
if(!IsHoag()) {
if(profile != SysClkProfile_Docked)
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0);
else
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 5, " Hz", 1, 0);
}
#endif
this->addModuleListItemToggle(profile, HorizonOCModule_Governor);
}

View File

@@ -255,8 +255,10 @@ void GlobalOverrideGui::listUI()
this->addModuleListItem(SysClkModule_CPU);
this->addModuleListItem(SysClkModule_GPU);
this->addModuleListItem(SysClkModule_MEM);
if(!IsHoag())
this->addModuleListItemValue(HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0);
#ifndef IS_MINIMAL
if(!IsHoag())
this->addModuleListItemValue(HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0);
#endif
this->addModuleToggleItem(HorizonOCModule_Governor);
}

View File

@@ -97,18 +97,19 @@ void MainGui::listUI()
return false;
});
this->listElement->addItem(miscItem);
#ifndef IS_MINIMAL
tsl::elm::ListItem* infoItem = new tsl::elm::ListItem("Information");
infoItem->setClickListener([this](u64 keys) {
if((keys & HidNpadButton_A) == HidNpadButton_A && this->context)
{
tsl::changeTo<InfoGui>();
return true;
}
tsl::elm::ListItem* infoItem = new tsl::elm::ListItem("Information");
infoItem->setClickListener([this](u64 keys) {
if((keys & HidNpadButton_A) == HidNpadButton_A && this->context)
{
tsl::changeTo<InfoGui>();
return true;
}
return false;
});
this->listElement->addItem(infoItem);
return false;
});
this->listElement->addItem(infoItem);
#endif
}
void MainGui::refresh()

View File

@@ -18,7 +18,6 @@ include $(DEVKITPRO)/libnx/switch_rules
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
#---------------------------------------------------------------------------------
TARGET := horizon-oc
KIP_CUST_REV := 1
BUILD := build
OUTDIR := out
RESOURCES := res

View File

@@ -991,4 +991,6 @@ void ClockManager::calculateGpuVmin (void)
configValues.values[KipConfigValue_marikoGpuVmin] = GetGpuVoltage(freq, speedo);
this->config->SetConfigValues(&configValues, true);
}
}
}
void ClockManager::CalculatePMICLimit(void) {}

View File

@@ -1,3 +1,21 @@
/*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#define EMC_INTSTATUS_0 0x0

View File

@@ -1,3 +1,21 @@
/*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "integrations.h"
ReverseNXSync::ReverseNXSync()

View File

@@ -1,3 +1,21 @@
/*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include <atomic>
#include <cstdio>

View File

@@ -1,3 +1,21 @@
/*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include <switch.h>
#include <stdio.h>

View File

@@ -24,7 +24,6 @@
* --------------------------------------------------------------------------
*/
#include <cstdlib>
#include <cstring>
#include <malloc.h>