mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 02:20:42 +00:00
Warn about unsupported resolutions in combination with SOPS
When using unsupported resolutions SOPS will default to 720p60
This commit is contained in:
@@ -658,15 +658,21 @@ int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, b
|
||||
|
||||
PDISPLAY_MODE mode = server->modes;
|
||||
bool correct_mode = false;
|
||||
bool supported_resolution = false;
|
||||
while (mode != NULL) {
|
||||
if (mode->width == config->width && mode->height == config->height && mode->refresh == config->fps)
|
||||
correct_mode = true;
|
||||
if (mode->width == config->width && mode->height == config->height) {
|
||||
supported_resolution = true;
|
||||
if (mode->refresh == config->fps)
|
||||
correct_mode = true;
|
||||
}
|
||||
|
||||
mode = mode->next;
|
||||
}
|
||||
|
||||
if (!correct_mode && !server->unsupported)
|
||||
return GS_NOT_SUPPORTED_MODE;
|
||||
else if (sops && !supported_resolution)
|
||||
return GS_NOT_SUPPORTED_SOPS_RESOLUTION;
|
||||
|
||||
if (config->height >= 2160 && !server->supports4K)
|
||||
return GS_NOT_SUPPORTED_4K;
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
#define GS_UNSUPPORTED_VERSION -7
|
||||
#define GS_NOT_SUPPORTED_MODE -8
|
||||
#define GS_ERROR -9
|
||||
#define GS_NOT_SUPPORTED_SOPS_RESOLUTION -10
|
||||
|
||||
extern const char* gs_error;
|
||||
|
||||
Reference in New Issue
Block a user