mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
local: CPU clock before temperature in HUD
This commit is contained in:
1 parent
6d4961f7b6
commit
e97e6b29df
2 files changed
+6
-5
No files matched your search
+1
-1
@@ -134,7 +134,7 @@ android {
|
|||||||
applicationId "com.droiddeck.launcher"
|
applicationId "com.droiddeck.launcher"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 22
|
versionCode 24
|
||||||
versionName "0.6.7-dnsfix"
|
versionName "0.6.7-dnsfix"
|
||||||
buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\""
|
buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\""
|
||||||
buildConfigField "String", "SOURCE_COMMIT", "\"${sourceCommit}\""
|
buildConfigField "String", "SOURCE_COMMIT", "\"${sourceCommit}\""
|
||||||
|
|||||||
@@ -766,9 +766,9 @@ class DroidDeckHudView(context: Context) : View(context) {
|
|||||||
if (showCPU) {
|
if (showCPU) {
|
||||||
val v = ArrayList<Span>()
|
val v = ArrayList<Span>()
|
||||||
v += numUnit(s.cpuPercent?.toString(), "%", rowPx, unitPx)
|
v += numUnit(s.cpuPercent?.toString(), "%", rowPx, unitPx)
|
||||||
|
v += gap(unitPx); v += numUnit(s.cpuClockMhz?.toString(), "MHz", rowPx, unitPx)
|
||||||
if (showCpuTemp) tempSpans(s.cpuTempC, HudMetrics.TempSensor.CPU, rowPx, unitPx)
|
if (showCpuTemp) tempSpans(s.cpuTempC, HudMetrics.TempSensor.CPU, rowPx, unitPx)
|
||||||
.let { if (it.isNotEmpty()) { v += gap(unitPx); v += it } }
|
.let { if (it.isNotEmpty()) { v += gap(unitPx); v += it } }
|
||||||
v += gap(unitPx); v += numUnit(s.cpuClockMhz?.toString(), "MHz", rowPx, unitPx)
|
|
||||||
rows.add(HudRow(Span("CPU", colCpu, rowPx), v))
|
rows.add(HudRow(Span("CPU", colCpu, rowPx), v))
|
||||||
}
|
}
|
||||||
if (showVram && s.vramText() != null)
|
if (showVram && s.vramText() != null)
|
||||||
@@ -853,8 +853,9 @@ class DroidDeckHudView(context: Context) : View(context) {
|
|||||||
if (showGpuTemp && s.gpuTempC != null) HudMetrics.formatTemp(s.gpuTempC.toFloat(), tempDisplay, false)
|
if (showGpuTemp && s.gpuTempC != null) HudMetrics.formatTemp(s.gpuTempC.toFloat(), tempDisplay, false)
|
||||||
else s.gpuClockMhz?.let { "${it}MHz" }, false))
|
else s.gpuClockMhz?.let { "${it}MHz" }, false))
|
||||||
if (showCPU) tiles.add(Tile("CPU", colCpu, numUnit(s.cpuPercent?.toString(), "%", valPx, unitPx),
|
if (showCPU) tiles.add(Tile("CPU", colCpu, numUnit(s.cpuPercent?.toString(), "%", valPx, unitPx),
|
||||||
listOfNotNull(if (showCpuTemp) s.cpuTempC?.let { HudMetrics.formatTemp(it.toFloat(), tempDisplay, false) } else null,
|
listOfNotNull(s.cpuClockMhz?.let { "${it}MHz" },
|
||||||
s.cpuClockMhz?.toString()).joinToString(" · ").ifBlank { null }, false))
|
if (showCpuTemp) s.cpuTempC?.let { HudMetrics.formatTemp(it.toFloat(), tempDisplay, false) } else null)
|
||||||
|
.joinToString(" · ").ifBlank { null }, false))
|
||||||
if (showVram && s.vramText() != null) tiles.add(Tile("VRAM", colVram, valueUnit(s.vramText()!!, valPx, unitPx), null, false))
|
if (showVram && s.vramText() != null) tiles.add(Tile("VRAM", colVram, valueUnit(s.vramText()!!, valPx, unitPx), null, false))
|
||||||
if (showRAM) tiles.add(Tile("RAM", colRam, numUnit(s.ramPercent.roundToInt().toString(), "%", valPx, unitPx),
|
if (showRAM) tiles.add(Tile("RAM", colRam, numUnit(s.ramPercent.roundToInt().toString(), "%", valPx, unitPx),
|
||||||
"${s.ramUsedText()} / ${s.ramTotalText()}", false))
|
"${s.ramUsedText()} / ${s.ramTotalText()}", false))
|
||||||
@@ -1147,9 +1148,9 @@ class DroidDeckHudView(context: Context) : View(context) {
|
|||||||
if (showCPU) {
|
if (showCPU) {
|
||||||
val v = ArrayList<Span>()
|
val v = ArrayList<Span>()
|
||||||
v += numUnit(s.cpuPercent?.toString(), "%", rowPx, unitPx)
|
v += numUnit(s.cpuPercent?.toString(), "%", rowPx, unitPx)
|
||||||
|
v += gap(unitPx); v += numUnit(s.cpuClockMhz?.toString(), "MHz", rowPx, unitPx)
|
||||||
if (showCpuTemp) tempSpans(s.cpuTempC, HudMetrics.TempSensor.CPU, rowPx, unitPx)
|
if (showCpuTemp) tempSpans(s.cpuTempC, HudMetrics.TempSensor.CPU, rowPx, unitPx)
|
||||||
.let { if (it.isNotEmpty()) { v += gap(unitPx); v += it } }
|
.let { if (it.isNotEmpty()) { v += gap(unitPx); v += it } }
|
||||||
v += gap(unitPx); v += numUnit(s.cpuClockMhz?.toString(), "MHz", rowPx, unitPx)
|
|
||||||
left.add(HudRow(Span("CPU", colCpu, rowPx), v))
|
left.add(HudRow(Span("CPU", colCpu, rowPx), v))
|
||||||
}
|
}
|
||||||
if (showPerCore) {
|
if (showPerCore) {
|
||||||
|
|||||||
Reference in new issue
Block a user