Repository navigation
Frame rate 40 / 45: escolhido pela maior taxa que a tela oferece, não pela atual - #455
Conversation
|
Obrigado pela investigação, o problema é real: o HyperOS deixa o jogo em 60 Hz e aí o modo 40/45 cai para 30. Mas essa mudança não tem efeito no Android: o SDL registra uma única tela com um único modo, o atual ( Para corrigir de fato é preciso perguntar ao Android pelo JNI ( |
…screen offers (Display.getSupportedModes) HyperOS keeps a game at 60 Hz on a 120 Hz screen until the window asks for more, and SDL registers only the current mode (SDL_androidvideo.c, Android_ScreenRate), so from the current rate 40 / 45 fell to 30 and never asked (POCO F7 Pro). The activity's maxRefreshRate() (the fastest supported mode at the current resolution, read once over JNI) decides what android_frame_rate asks for; the frame rate itself still follows the current rate (vk_between_fps), so 30 until the system switches, and on a system that won't. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Você tem razão: conferi o Refiz pelo JNI, neste mesmo PR, com rebase sobre o
Testado no POCO F7 Pro (HyperOS 3, tela de até 120 Hz, que o HyperOS deixa em 60 Hz nos jogos), Frame rate 45, celular na bateria e num cooler. Três rodadas seguidas, cada uma abrindo o app do zero:
Log de uma rodada: Antes, com a tela em 60 Hz, o modo 40/45 ficava em 30 e nunca pedia nada. Uma ressalva: mais cedo, com o celular quente depois de outros testes, houve uma rodada em que o sistema não trocou: a janela pediu 40 e a tela ficou em 60 Hz por mais de um minuto. Nesse caso o jogo ficou em 30 fps, como antes, porque a taxa do jogo continua seguindo a tela atual. Suspeito de um limite térmico do HyperOS na taxa da tela, mas não confirmei. Nas outras 4 rodadas, contando duas ainda com o celular quente, a troca aconteceu. |
ff67c67 to
8964997
Compare
…t helped and what didn't Each change with its PR and state (mamcjr#452 and mamcjr#456 merged, mamcjr#453 mamcjr#454 mamcjr#455 mamcjr#457 proposed), the 40 / 45 fps section on the JNI version of mamcjr#455, and the code that only existed in the test build (present thread, shadow cascades, the 30 fps rate hint, kgsl, affinity) in its own "Testado fora do repositório" section, saying its variables aren't in the app. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks, this is the real fix: the screen's highest rate from Android. I'll check Frame rate 40/45 on our POCO (HyperOS) and merge. |
|
Thanks! On the POCO (HyperOS) with Frame rate 40 / 45: "the screen offers up to 120 Hz", 40 fps chosen, and the window asks for 120 Hz content. Merging. |
…mamcjr#457 merged; how each one landed The status table and the section titles say merged. Sections 3-6 describe the code as it landed instead of the proposal: mamcjr#454 queues the slots on every device (LARECOMP_SLOT_DRAIN=1 waits), with the 60 fps numbers of the merged version; mamcjr#455 says its first version had no effect on Android (SDL lists only the current mode) and the merged one asks Android through JNI, rechecked on 0.4.13 (40 fps on a 120 Hz screen); mamcjr#453 notes the window stays off by default on Adreno and mamcjr#506 took the snapshot cache to Mali.
O que muda
O modo 40 / 45 pede a taxa à janela (
android_frame_rate) a partir da maior taxa que a tela oferece, perguntada ao Android pelo JNI, e não mais da taxa atual. O SDL registra só o modo atual (SDL_androidvideo.c,Android_ScreenRate), por isso a pergunta vai direto ao Android:BOTWRecompAndroidActivity.maxRefreshRate(): a maiorgetRefreshRate()deDisplay.getSupportedModes(), entre os modos com a mesma resolução do atual (Activity.getDisplay(), minSdk 30).plat_max_refresh_hz()emplatform/android.cchama esse método uma vez.device.c:vk_between_target()decide o que a janela pede. A taxa do jogo continua seguindo a taxa atual da tela (vk_between_fps()), então fica em 30 até o sistema trocar, e continua em 30 num sistema que não troca.Por quê
O HyperOS deixa um jogo em 60 Hz numa tela de 120 Hz até a janela pedir mais. Com a tela em 60 Hz, o modo 40 / 45 saía 30, não pedia nada e a tela nunca ia a 120 Hz: o 40 fps só funcionava quando a tela por acaso já estava em 120 Hz ao abrir o jogo.
Medido
Frame rate 45, abrindo o app do zero com a tela em 60 Hz, celular na bateria e num cooler. Três rodadas seguidas:
Ressalva: com o celular quente, houve uma rodada em que o sistema não trocou (a tela ficou em 60 Hz) e o jogo ficou em 30 fps, como antes. Suspeito de um limite térmico do HyperOS na taxa da tela, mas não confirmei. Nas outras 4 rodadas a troca aconteceu.
Aparelho e método
🤖 Generated with Claude Code