more lite changes

This commit is contained in:
souldbminersmwc
2026-03-15 10:27:30 -04:00
parent 1e4dada672
commit b8f50da45f
3 changed files with 5 additions and 24 deletions

View File

@@ -15,17 +15,12 @@
*
*/
#ifndef DISPLAY_REFRESH_RATE_H
#define DISPLAY_REFRESH_RATE_H
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Display mode structures
typedef struct {
uint16_t hFrontPorch;
uint8_t hSyncWidth;
@@ -52,7 +47,6 @@ typedef struct {
uint8_t max;
} MinMaxRefreshRate;
// Display mode information
typedef struct {
uint32_t unk0;
uint32_t hActive;
@@ -76,7 +70,6 @@ typedef struct {
uint32_t num_modes;
} NvdcModeDB2;
// PLL structures
typedef struct {
unsigned int PLLD_DIVM: 8;
unsigned int reserved_1: 3;
@@ -109,7 +102,6 @@ typedef struct {
unsigned int reserved: 2;
} PLLD_MISC;
// Configuration structure
typedef struct {
uint64_t clkVirtAddr;
uint64_t dsiVirtAddr;
@@ -132,9 +124,3 @@ uint8_t DisplayRefresh_GetDockedHighestAllowed(void);
void DisplayRefresh_CorrectOledGamma(uint32_t refresh_rate);
void DisplayRefresh_SetAllowedDockedRatesIPC(uint32_t refreshRates, bool is720p);
void DisplayRefresh_Shutdown(void);
#ifdef __cplusplus
}
#endif
#endif // DISPLAY_REFRESH_RATE_H

View File

@@ -29,11 +29,9 @@
#define MAX_REFRESH_RATE 72
// Configuration
static DisplayRefreshConfig g_config = {0};
static bool g_initialized = false;
// State
static uint8_t g_dockedHighestRefreshRate = 60;
static uint8_t g_dockedLinkRate = 10;
static bool g_wasRetroSuperTurnedOff = false;
@@ -41,7 +39,6 @@ static uint32_t g_lastVActive = 1080;
static bool g_canChangeRefreshRateDocked = false;
static uint8_t g_lastVActiveSet = 0;
// Refresh rate tables
static const uint8_t g_dockedRefreshRates[] = {40, 45, 50, 55, 60, 70, 72, 75, 80, 90, 95, 100, 110, 120, 130, 140, 144, 150, 160, 165, 170, 180, 190, 200, 210, 220, 230, 240};
// Calculate with this tool:
@@ -101,8 +98,6 @@ static const HandheldTimings g_handheldTimingsRETRO[] = {
static const MinMaxRefreshRate g_handheldModeRefreshRate = {40, 80};
// Utility functions
static uint8_t _getDockedRefreshRateIterator(uint32_t refreshRate) {
for (size_t i = 0; i < sizeof(g_dockedRefreshRates) / sizeof(g_dockedRefreshRates[0]); i++) {
if (g_dockedRefreshRates[i] == refreshRate) return i;
}

View File

@@ -154,11 +154,11 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
renderer->drawString(labels[10], false, positions[2], y, SMALL_TEXT_SIZE, tsl::sectionTextColor);
renderer->drawString(displayStrings[20], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_Battery]); // Battery
if(!IsHoag()) {
renderer->drawString(labels[13], false, positions[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label
renderer->drawString(labels[13], false, positions[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label
renderer->drawString(displayStrings[25], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp freq
renderer->drawString(displayStrings[25], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp freq
}
renderer->drawString(labels[12], false, positions[3], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // fan label
renderer->drawString(displayStrings[24], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // fan speed