loki-47-6F-64 / sunshine

Host for Moonlight Streaming Client
GNU General Public License v3.0
1.77k stars 152 forks source link

[Moonlight-embedded] : Missing list of supported resolutions #23

Open loki-47-6F-64 opened 4 years ago

loki-47-6F-64 commented 4 years ago

Moonlight-Embedded searches for specific elements in /serverinfo

<SupportedDisplayMode>
  <DisplayMode>
    <Height>2160</Height>
    <RefreshRate>30</RefreshRate>
    <Width>3840</Width>
  </DisplayMode>
  <DisplayMode>
    <Height>1080</Height>
    <RefreshRate>60</RefreshRate>
    <Width>1920</Width>
    </DisplayMode>
  <DisplayMode>
    <Height>1080</Height>
    <RefreshRate>30</RefreshRate>
    <Width>1920</Width>
  </DisplayMode>
</SupportedDisplayMode>

They are missing, as a result Moonlight-Embedded fails, saying the resolution is not supported It can be worked around by adding --unsupported to Moonlight-Embedded

nicman23 commented 4 years ago

to work with moonlight-nx (a nintendo switch port) i added this ugliness in sunshine/nvhttp.cpp:495

pt::ptree displaymodes;

pt::ptree displaymode1;
pt::ptree displaymode2;

displaymode1.add("DisplayMode.Width", "1920");
displaymode1.add("DisplayMode.Height", "1080");
displaymode1.add("DisplayMode.RefreshRate", "60");

displaymode2.add("DisplayMode.Width", "1280");
displaymode2.add("DisplayMode.Height", "720");
displaymode2.add("DisplayMode.RefreshRate", "60");

displaymodes.add_child("SupportedDisplayMode",displaymode1);
displaymodes.add_child("SupportedDisplayMode",displaymode2);

tree.add_child("root.SupportedDisplayMode", displaymodes);
bmurta commented 4 years ago

@nicman23 can you share the compiled build with theses changes? I'm trying to make sunshine work with moonlight-nx but i can't seem to get past the "Mode not supported" popup

KiralyCraft commented 4 years ago

Here it is, but the path where it looks for the config is apparently my local path, so create the paths when it complains: https://www49.zippyshare.com/v/2mkwHQx7/file.html

I just added nicman's fix and compiled

nicman23 commented 4 years ago

that is good because i do not have windows to compile a win32 bin with :P

wotansp commented 3 years ago

Here it is, but the path where it looks for the config is apparently my local path, so create the paths when it complains: https://www49.zippyshare.com/v/2mkwHQx7/file.html

I just added nicman's fix and compiled

Is it possible to get that build? I have 0 skills at programming or compiling and I get the same error as previously mentioned by other users.

Thanks