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

Can't change tablet area to screen area mapping #12098

Open
LittleEndu opened this issue Mar 20, 2021 · 12 comments · May be fixed by #31141
Open

Can't change tablet area to screen area mapping #12098

LittleEndu opened this issue Mar 20, 2021 · 12 comments · May be fixed by #31141

Comments

@LittleEndu
Copy link
Contributor

When looking at OTD settings this is the setting called "Display". In lazer there probably needs to be some extra settings to deal with screen scaling options like changing the screen scaling (or tablet's display area) to match tablet area's aspect ratio

osu!lazer version:
2021.320.0

@bdach
Copy link
Collaborator

bdach commented Mar 20, 2021

I think that if scaling is active, then absolute input should only apply in (and be scaled to) the confines of said scaled area. I don't see any scenario in which being able to put the mouse pointer over the letterboxed areas would be useful. Is that fine? I'm asking to avoid adding settings where they're potentially not needed.

@LittleEndu
Copy link
Contributor Author

Is that fine?

Probably if it's somehow made clear that the mapping only applies to the scaled screen. I don't see myself using this setting (only want this visible to confirm some other weird behaviour I'm seeing) so somebody else should also voice their opinion on this.

@peppy
Copy link
Member

peppy commented Mar 20, 2021

are you proposing an option to change the lazer window (or letterboxing) to match the tablet aspect ratio, rather than vice versa?

@LittleEndu
Copy link
Contributor Author

LittleEndu commented Mar 20, 2021

are you proposing an option to change the lazer window (or letterboxing) to match the tablet aspect ratio, rather than vice versa?

Yes, but that in addition to just plain being able to set the screen area in the first place.

edit: And not "rather", I think if letterboxing is enabled, a button to set the letterbox size to tablet area's aspect ratio should appear along side the current one.

@peppy
Copy link
Member

peppy commented Mar 20, 2021

To confirm, this is for people that map their tablets to only the play area, making it impossible to navigate menus using it?

@LittleEndu
Copy link
Contributor Author

Yes, this would be used to map the tablet only to the play area. Specifically mapping the full tablet area, you wouldn't care about this if you play with a smaller area (you can achieve similar mapping by increasing your active area)

@MissingSemi-Colon
Copy link

I think that if scaling is active, then absolute input should only apply in (and be scaled to) the confines of said scaled area. I don't see any scenario in which being able to put the mouse pointer over the letterboxed areas would be useful. Is that fine? I'm asking to avoid adding settings where they're potentially not needed.

That is exactly what I asked for on the thread you closed. >> "Is it possible to make a quick change and to map the absolute input to the scaled window?"

So, I see that now we have custom tablet area in the game, so I gave it a try. Basically, the issue is still the same, there's no way to tell the game to confine the input on the scaled part.

To confirm, this is for people that map their tablets to only the play area, making it impossible to navigate menus using it?

Personally, I'd scale everything, so it is still possible to navigate, just like normal osu! letterboxing.

@collinkreutzer
Copy link

I think that if scaling is active, then absolute input should only apply in (and be scaled to) the confines of said scaled area. I don't see any scenario in which being able to put the mouse pointer over the letterboxed areas would be useful. Is that fine? I'm asking to avoid adding settings where they're potentially not needed.

To confirm, this is for people that map their tablets to only the play area, making it impossible to navigate menus using it?

If the tablet area would be scaled to the set screen scaling (letterboxing), the menus are still accessible. Without this option, I'm currently unable to play with the built in driver as i encounter the following problem:

My monitor has a native resolution of 5120x1440p (Samsung CRG9, 1440p 32:9 or essentially two 1440p 16:9 side by side on one panel). This makes the tablet driver scale the tablet area to a much wider screen area, limiting the maximum usable tablet area quite a lot. Setting the full screen resolution to 2560x1440 resolves this problem but causes another one: osu is now rendering at 60 instead of 120Hz. Im unsure wether this is caused by the monitors "auto scaling" only supporting 60Hz or osu it self. But osu definitely detects the screen as 60Hz and the screen is definitely refreshing at 60Hz, even with vsync off. The best option in this case would be to render at native resolution (mitigating any possible problems with the display) and using the (much appreciated) display scaling set to 50% and having the tablets area be scaled to this letterboxed image. I don't really see the point of having it scale beyond the rendered area (into the letterbox) limiting the available tablet area. Thanks to the built in screen scaling, the menus are already inside the play area.

Native Resolution with display scaling (maximum tablet area is limited severely by the aspect ratio):
scaled
scaled_tablet

Custom 2560x1440 resolution without scaling (tablet area is fine, but running at 60Hz - possibly due to the displays auto scaling feature letterboxing mode being limited?!)
resolution
resolution_tablet

@DanielPower
Copy link
Contributor

This issue currently makes it impossible for full area players to use screen scaling. I will be unable to play Lazer until this is addressed.

image

Using the built-in tablet driver, the tablet is mapped to the entire screen, including the unused area outside osu!'s interface. Meaning the player is effectively limited to a significantly smaller tablet area.

@peppy
Copy link
Member

peppy commented Sep 11, 2023

That's a tough one. We'll likely need to add special handling when screen scaling is set to "everything".

@raiguard
Copy link

I would like to add my voice of support to this. I have used my window manager configuration (Linux, Sway) to map my tablet to the 16:9 center region of my ultrawide monitor, but going through the WM introduces noticeable latency. It absolutely wrecks my jumping performance. Whereas going through osu maps it to the entire screen, which I can't adjust for because I use a full tablet area.

image

@DanielPower
Copy link
Contributor

DanielPower commented Dec 16, 2024

#12098 (comment)

I think that if scaling is active, then absolute input should only apply in (and be scaled to) the confines of said scaled area. I don't see any scenario in which being able to put the mouse pointer over the letterboxed areas would be useful. Is that fine? I'm asking to avoid adding settings where they're potentially not needed.

#12098 (comment)

That's a tough one. We'll likely need to add special handling when screen scaling is set to "everything".

I think special handling when setting screen scaling to "Everything" would help for many people using full area with screen scaling. Tablet output scaling would not always be desirable when using "Excluding Overlays" or "Gameplay" since it would leave some UI elements inaccessible with the tablet. Some users may desire a more configurable solution, but I think just handling the "Everything" mode is a good compromise, at least initially.

I started investigating this, but ran into some problems due to my lack of knowledge of lazer's codebase.

OpenTabletDriverHandler.cs in osu-framework defines the absoluteOutputMode.Output. Updating this to use the scaled width/height would produce the desired behaviour. However the tabletHandler which is responsible for updating those settings is in TabletSettings.cs, whereas ScalingMode is updated in LayoutSettings.cs. I'm not sure currently if there's a convenient place to access both the OutputMode and the tabletHandler`.

I'm relatively new to C#, so I apologize if the answer is obvious. But I'd appreciate any advice/suggestions. I've also written an introduction on the Discord, and would be happy to start a discussion there once I'm approved if that's a more appropriate place for this.

Edit: I discovered OsuConfigManager can be accessed in the load function of TabletSettings, which enabled me to get a working proof of concept. I'll try to have a draft PR up tomorrow as a starting point. Though I still need to update unit tests, and I expect there will be critiques as I'm not well versed with either C# or lazer's code standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants