XITRIX / Moonlight-Switch

Moonlight port for Nintendo Switch
781 stars 47 forks source link

The streams outputs at 720p despite selecting the 1080p option #4

Closed renA21 closed 2 years ago

renA21 commented 2 years ago

Title says it all, and prolly UI too? Not sure if the latter is a borealis thing that only allows rendering the UI at 720p when docked.

XITRIX commented 2 years ago

Thank you for the report, I'll try to figure it out.

XITRIX commented 2 years ago

Could not reproduce it, but 1080p is working not so great as expected. Discussion about it here #7

renA21 commented 2 years ago

1080p doesn't work well on stock clocks but it does when overclocking the CPU--but this is not the issue I was describing. What I was referring to is that I believe that Moonlight-Switch does decode the video stream at 1080p as intended (since it shows that the Switch is struggling to decode at stock clocks,) but the output is most likely downsampled to 720p instead. Moonlight-NX on the other hand does output actual 1080p frames on docked along with its UI, which leads me to believe that this is some borealis-side issue where the UI is still rendered at 720p despite being docked.

XITRIX commented 2 years ago

Ok, I got it, but how do you see this downscale? On first glance, when I connected switch to my monitor, I'm not sure that image was downscaled, also, I've checked the code of borealis renderer, the only thing it does, is - upscaling UI, so local coordinates will be in range from 0 to 720 on any screen size, but still, as I can see it renders in native resolution, also moonlight frame renderer was taken right from moonlight-nx, so I'm not sure how to recognize the problem... Still, I'll try to do something with it.

renA21 commented 2 years ago

I tested this on my 1080p monitor, first image is from Moonlight-Switch, and second from Moonlight-NX. Both set to 1080p resolution.

image

image

Fwiw, I've seen other homebrew programs that make use of borealis and are able to output the UI at 1080p, such as ReverseNX-Tool and sys-clk.

XITRIX commented 2 years ago

Hmm… Yes, there is the difference. The problem is, that I’m using highly modified version of borealis, so maybe I broke something by my self, but I’m absolutely sure, that borealis UI renders in native resolution, cause I cannot see any pixels on my MacBook’s screen, when app opens in full screen.

I’ll try to investigate it…

XITRIX commented 2 years ago

Ok, I'm an idiot... Yes, it renders UI in native resolution... but only on PC... I don't know why, but resolution change callback not working on switch, now I had already make it work with hack, by force setting screen resolution, depending on switch mode type (portable - 720p, dock - 1080p), but I think there should be a better way of doing that. If you'd like, I could attach a build with that hack in that issue, until I'll find a better way, and will update a release version.

XITRIX commented 2 years ago

Ok, I think I've found not great, but good enough solution to fix it, check it and tell me, if it works well.

Fixed in Release v0.7.1

renA21 commented 2 years ago

Just tested it and can confirm that is working as intended. Thanks! I hope, you'll be able to find a better implementation of this eventually.