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

Add option for correct Aspect Ratio #11

Open
MyFilippo94 opened this issue Apr 27, 2019 · 0 comments
Open

Add option for correct Aspect Ratio #11

MyFilippo94 opened this issue Apr 27, 2019 · 0 comments

Comments

@MyFilippo94
Copy link

MyFilippo94 commented Apr 27, 2019

I have a 21:9 screen and a 16:10 one, the app is unable to display the correct screen ratio in either of these screens, with fullscreen enabled. Please add an option to choose between stretch and keep ratio, it's really needed to enjoy this application in fullscreen.

I saw a reported issue that was describing the same problem, it's marked as closed. It isn't fixed unfortunately.

Maybe a quick solution might be, the file https://github.com/lazydevyo/PSVitaDock/blob/master/Assets/Script/VitaCaptureU.cs, to add at line 208 some code like this, to get as a result a forced correct aspect ratio:

float PSVratio = 960f/544f
bool isWider = (ResScreen_w/ResScreen_h >= PSVratio);
float tempres_w = 0f;
float tempres_h = 0f;
if (isWider) {
	tempres_w = ResScreen_h*PSVratio;
	tempres_h = ResScreen_h;
} else {
	tempres_w = ResScreen_w;
	tempres_h = ResScreen_w*(1/PSVratio);
}

This assumes that the fullscreen mode is Borderless Window, and probably it'd work even if the resolution is not in the driver's database.

I have not the possibility to install Unity now and look at your source code to provide a better patch unfortunately, probably it'd be better just to force to aspect ratio the rendered texture itself, but that's the best I can suggest for now.

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

No branches or pull requests

1 participant