Compare commits

...

15 Commits

Author SHA1 Message Date
光明使者 09b0e34e5a Merge branch 'dev' into 'dev'
Draft: Improved temperature display

See merge request suyu-emu/suyu!145
2024-03-21 07:42:47 +00:00
Miguel Rodriguez d12b127c45 chore: fix CI to use string "true" for FASTZIP 2024-03-21 07:09:11 +00:00
995 383a243aa7 Update README.md 2024-03-20 21:53:10 +00:00
光明使者 2912018dd8 Update vcpkg.json 2024-03-16 06:52:48 +00:00
光明使者 b1b17bc23c Merge branch suyu:dev into dev 2024-03-16 06:44:20 +00:00
光明使者 410aa4f6d6 Update .gitlab-ci.yml 2024-03-15 15:12:02 +00:00
光明使者 3a6ffcf486 Merge branch suyu:dev into dev 2024-03-15 15:08:24 +00:00
光明使者 84c2c32ea5 Improved temperature display 2024-03-14 06:30:51 +00:00
光明使者 1a6dd52dcd Merge branch suyu:dev into dev 2024-03-14 06:11:28 +00:00
光明使者 a0c9735bcb Upload New File 2024-03-13 18:34:32 +00:00
光明使者 befd9abfda Improved temperature display 2024-03-13 16:20:34 +00:00
光明使者 333d5ce965 Update MainActivity.kt 2024-03-13 16:18:56 +00:00
光明使者 dd7c3bc14b Improved temperature display 2024-03-13 15:48:11 +00:00
光明使者 d35a98bb1f Improved temperature display 2024-03-13 15:40:50 +00:00
光明使者 15374d9a4e Update file MainActivity.kt 2024-03-13 13:18:58 +00:00
5 changed files with 26 additions and 29 deletions

View File

@ -8,9 +8,9 @@ variables:
ARTIFACT_COMPRESSION_LEVEL: "fast"
CACHE_COMPRESSION_LEVEL: "fastest"
CACHE_REQUEST_TIMEOUT: 5
# Use FASTZIP for faster compression in cache and artifacts
# Use FASTZIP for faster compression in cache and artifacts (boolean)
# https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
FF_USE_FASTZIP: true
FF_USE_FASTZIP: 1
# Our Variables
CACHE_DIR: "$CI_PROJECT_DIR/ccache"

View File

@ -51,10 +51,12 @@ You can also contact any of the developers on Discord to learn more about the cu
## Downloads
* __Windows__: WIP
* __Linux__: WIP
* __Windows__: [Releases](https://gitlab.com/suyu-emu/suyu/-/releases)
* __Linux__: [Releases](https://gitlab.com/suyu-emu/suyu/-/releases)
* __macOS__: [Releases](https://gitlab.com/suyu-emu/suyu/-/releases)
* __Android__: [Releases](https://gitlab.com/suyu-emu/suyu/-/releases)
We don't have any official builds yet! If any website or person is claiming to have a build for suyu, take that with a grain of salt, because it might contain malware. Until we do have an official build, it might be a better idea to keep using the last version of yuzu.
We have official builds [here.](https://gitlab.com/suyu-emu/suyu/-/releases) If any website or person is claiming to have a build for suyu, take that with a grain of salt.
## Building

BIN
externals/turnip-24.1.0.R17.zip vendored 100644

Binary file not shown.

View File

@ -517,34 +517,29 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val showOverlay = BooleanSetting.SHOW_THERMAL_OVERLAY.getBoolean()
binding.showThermalsText.setVisible(showOverlay)
if (showOverlay) {
thermalStatsUpdater = {
if (emulationViewModel.emulationStarted.value &&
!emulationViewModel.isEmulationStopping.value
) {
val thermalStatus = when (powerManager.currentThermalStatus) {
PowerManager.THERMAL_STATUS_LIGHT -> "😥"
PowerManager.THERMAL_STATUS_MODERATE -> "🥵"
PowerManager.THERMAL_STATUS_SEVERE -> "🔥"
PowerManager.THERMAL_STATUS_CRITICAL,
PowerManager.THERMAL_STATUS_EMERGENCY,
PowerManager.THERMAL_STATUS_SHUTDOWN -> "☢️"
else -> "🙂"
}
if (_binding != null) {
binding.showThermalsText.text = thermalStatus
}
thermalStatsUpdateHandler.postDelayed(thermalStatsUpdater!!, 1000)
if (emulationViewModel.emulationStarted.value &&
!emulationViewModel.isEmulationStopping.value
) {
val temperature = getBatteryTemperature(context)
if (_binding != null) {
binding.showThermalsText.text = "$temperature°C"
binding.showThermalsText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20)
}
}
thermalStatsUpdateHandler.post(thermalStatsUpdater!!)
} else {
if (thermalStatsUpdater != null) {
thermalStatsUpdateHandler.removeCallbacks(thermalStatsUpdater!!)
}
binding.showThermalsText.setVisible(false)
}
}
private fun getBatteryTemperature(context: Context): Float {
val intent: Intent? = context.registerReceiver(
null,
IntentFilter(Intent.ACTION_BATTERY_CHANGED)
)
val temperature = intent?.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0) ?: 0
return temperature / 10.0f
}
@SuppressLint("SourceLockedOrientationActivity")
private fun updateOrientation() {
emulationActivity?.let {

View File

@ -3,10 +3,10 @@
"name": "suyu",
"builtin-baseline": "a42af01b72c28a8e1d7b48107b33e4f286a55ef6",
"version": "1.0",
"dependencies": [
"dependencies":
"boost-algorithm",
"boost-asio",
"boost-bind",
"boost-bind",
"boost-config",
"boost-container",
"boost-context",