Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] 在安卓设备上游玩时保持屏幕常亮 #251

Open
Silvigarabis opened this issue Jan 8, 2024 · 6 comments
Open

[enhancement] 在安卓设备上游玩时保持屏幕常亮 #251

Silvigarabis opened this issue Jan 8, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Silvigarabis
Copy link

Silvigarabis commented Jan 8, 2024

当你在安卓设备上游玩时,无论处于 Phira 的任何页面,屏幕都会随着系统设置的超时而关闭。不太确定这是错误还是说真的没有保持屏幕常亮的功能(毕竟咱也看不懂代码)。

能否添加一个设置,允许在游玩谱面的时候保持屏幕常亮?对于想要观赏某些谱面的人来说会很好。

这个设置可能有以下几种模式:禁用屏幕常亮、仅游玩谱面时、在应用内时。

使用的是安卓设备(如果有必要,请提醒我添加详细的设备信息)。

对于其他系统,我不知道是不是也有这样的问题,如果有,可能还需要一些调整。

@sjfhsjfh sjfhsjfh added enhancement New feature or request good first issue Good for newcomers labels Jan 9, 2024
@littlekan233
Copy link

似乎Phira被安卓当成了应用而非游戏
导致不像本家那样子保持屏幕常亮
Rust语言(Phira使用的语言)好像很难实现🤔

@typed-sigterm
Copy link

理论上可以给窗口加上 FLAG_KEEP_SCREEN_ON

@TurtMaster2000
Copy link

I mean, doesn't music automatically turn off whenever your computer/device turns off? I guess it would be something that you could put as a "Tip" at the bottom. "Remember to always turn on no-sleep mode" or whatever.

@YuevUwU
Copy link
Contributor

YuevUwU commented May 15, 2024

They doesn't mean music. It's more like "Lock screen automatically".
If you don't interated with phone, the screen will lock/extinguish and pause the bgm.

About this setting, some latest Android phone can't disable it or set the time threshold to infinity. (Such as MIUI 13)

Due to use cross-platform framework, that may have some technical difficulties I think.

@Silvigarabis Silvigarabis changed the title [enhancement] 游玩时保持屏幕常亮 [enhancement] 在安卓设备上游玩时保持屏幕常亮 May 15, 2024
@Silvigarabis
Copy link
Author

Silvigarabis commented May 15, 2024

I mean, doesn't music automatically turn off whenever your computer/device turns off? I guess it would be something that you could put as a "Tip" at the bottom. "Remember to always turn on no-sleep mode" or whatever.

这里描述的是在安卓上的情况。你知道,手机上有一个屏幕超时的设置,当用户在设定的时间内,没有操控手机的时候,系统会将屏幕关闭。这时候Phira也就不能继续播放了。
What is described here is the situation on Android. You know, there is a screen timeout setting on the mobile phone. When the user does not control the phone within the set time, the system will turn off the screen. At this time, Phira cannot continue to play.

我刚刚更新了一下标题和内容,特别提到了这是安卓设备上的情况,不过我不太确定在其他系统上是否也有这样的问题。
I just updated the title and content to specifically mention that this is the case on Android devices, but I'm not sure if this is an issue on other systems as well.

而且,我认为在手机上将屏幕超时修改为无限也不是应该做的,而更应该是应用告诉系统它是一个正在播放什么东西的程序,以使系统不会在超时之后关闭屏幕
Also, I think changing the screen timeout to infinite on the phone is not something that should be done, but rather the app should tell the system that it is a program that is playing something so that the system does not turn off the screen after the timeout

@liquidhelium
Copy link
Member

通过ffi可以实现,应当不难

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants