isMariko check fix

This commit is contained in:
KazushiM
2021-09-12 13:08:27 +08:00
parent de9f7b7478
commit 584e8d8665
4 changed files with 21 additions and 31 deletions

View File

@@ -38,7 +38,7 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo
- Mariko variants have much lower power consumption compared to Erista, therefore **GPU clock capping is lifted for Mariko**.
- For more info, see [README.md](https://github.com/KazushiMe/Switch-OC-Suite/tree/master/Source/sys-clk-OC) in sys-clk-OC.
- **Auto-Boost CPU for faster game loading**
- When a game launches or is in loading screen, sys-clk will boost CPU to 1963.5 MHz (w/o charger) and 2295.0 MHz (with charger) for 20 seconds or until the loading screen ends.
- When a game launches or is in loading screen, sys-clk will boost CPU to 1963.5 MHz (w/o charger) and 2295.0 MHz (with charger) for ~10 seconds or until the loading screen ends.
- Some games don't utilize `SetCpuBoostMode` at all, e.g. Overcooked 2, so Auto-Boost will be unavailable to these games.
- To **disable this feature**, simply remove `boost_start.flag` and `boost.flag` in `/config/sys-clk/ `.
- **Fan Control Optimization** at high load

View File

@@ -62,26 +62,6 @@ void Clocks::Initialize()
rc = tcInitialize();
ASSERT_RESULT_OK(rc, "tcInitialize");
}
// Check if it's Mariko
u64 hardware_type = 0;
splInitialize();
splGetConfig(SplConfigItem_HardwareType, &hardware_type);
splExit();
switch(hardware_type) {
case 0: //Icosa
case 1: //Copper
break;
case 2: //Hoag
case 3: //Iowa
case 4: //Calcio
case 5: //Aula
isMariko = true;
break;
default:
break;
}
}
void Clocks::Exit()

View File

@@ -137,6 +137,26 @@ void FileUtils::RefreshFlags(bool force)
void FileUtils::InitCheckFlags()
{
// Check if it's Mariko
u64 hardware_type = 0;
splInitialize();
splGetConfig(SplConfigItem_HardwareType, &hardware_type);
splExit();
switch(hardware_type) {
case 0: //Icosa
case 1: //Copper
break;
case 2: //Hoag
case 3: //Iowa
case 4: //Calcio
case 5: //Aula
Clocks::isMariko = true;
break;
default:
break;
}
FILE *file;
// Only Enable Boost for Mariko
if (Clocks::isMariko)
@@ -146,8 +166,6 @@ void FileUtils::InitCheckFlags()
{
g_boost_enabled = true;
fclose(file);
} else {
g_boost_enabled = false;
}
file = fopen(FILE_BOOST_START_FLAG_PATH, "r");
@@ -155,8 +173,6 @@ void FileUtils::InitCheckFlags()
{
g_boost_start_enabled = true;
fclose(file);
} else {
g_boost_start_enabled = false;
}
}
@@ -165,8 +181,6 @@ void FileUtils::InitCheckFlags()
{
g_downclock_dock_enabled = true;
fclose(file);
} else {
g_downclock_dock_enabled = false;
}
file = fopen(FILE_REVERSENX_SYNC_FLAG_PATH, "r");
@@ -174,8 +188,6 @@ void FileUtils::InitCheckFlags()
{
g_reversenx_sync_enabled = true;
fclose(file);
} else {
g_reversenx_sync_enabled = false;
}
file = fopen(FILE_SALTYNX_PATH, "r");
@@ -183,8 +195,6 @@ void FileUtils::InitCheckFlags()
{
g_reversenx_tool_exist = true;
fclose(file);
} else {
g_reversenx_tool_exist = false;
}
}