mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 23:35:47 +00:00
Warn about unsupported resolutions in combination with SOPS
When using unsupported resolutions SOPS will default to 720p60
This commit is contained in:
parent
a66d75b145
commit
7f856d3284
@ -658,15 +658,21 @@ int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, b
|
|||||||
|
|
||||||
PDISPLAY_MODE mode = server->modes;
|
PDISPLAY_MODE mode = server->modes;
|
||||||
bool correct_mode = false;
|
bool correct_mode = false;
|
||||||
|
bool supported_resolution = false;
|
||||||
while (mode != NULL) {
|
while (mode != NULL) {
|
||||||
if (mode->width == config->width && mode->height == config->height && mode->refresh == config->fps)
|
if (mode->width == config->width && mode->height == config->height) {
|
||||||
correct_mode = true;
|
supported_resolution = true;
|
||||||
|
if (mode->refresh == config->fps)
|
||||||
|
correct_mode = true;
|
||||||
|
}
|
||||||
|
|
||||||
mode = mode->next;
|
mode = mode->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!correct_mode && !server->unsupported)
|
if (!correct_mode && !server->unsupported)
|
||||||
return GS_NOT_SUPPORTED_MODE;
|
return GS_NOT_SUPPORTED_MODE;
|
||||||
|
else if (sops && !supported_resolution)
|
||||||
|
return GS_NOT_SUPPORTED_SOPS_RESOLUTION;
|
||||||
|
|
||||||
if (config->height >= 2160 && !server->supports4K)
|
if (config->height >= 2160 && !server->supports4K)
|
||||||
return GS_NOT_SUPPORTED_4K;
|
return GS_NOT_SUPPORTED_4K;
|
||||||
|
@ -29,5 +29,6 @@
|
|||||||
#define GS_UNSUPPORTED_VERSION -7
|
#define GS_UNSUPPORTED_VERSION -7
|
||||||
#define GS_NOT_SUPPORTED_MODE -8
|
#define GS_NOT_SUPPORTED_MODE -8
|
||||||
#define GS_ERROR -9
|
#define GS_ERROR -9
|
||||||
|
#define GS_NOT_SUPPORTED_SOPS_RESOLUTION -10
|
||||||
|
|
||||||
extern const char* gs_error;
|
extern const char* gs_error;
|
||||||
|
@ -105,6 +105,8 @@ static void stream(PSERVER_DATA server, PCONFIGURATION config, enum platform sys
|
|||||||
fprintf(stderr, "Server doesn't support 4K\n");
|
fprintf(stderr, "Server doesn't support 4K\n");
|
||||||
else if (ret == GS_NOT_SUPPORTED_MODE)
|
else if (ret == GS_NOT_SUPPORTED_MODE)
|
||||||
fprintf(stderr, "Server doesn't support %dx%d (%d fps) or try --unsupported option\n", config->stream.width, config->stream.height, config->stream.fps);
|
fprintf(stderr, "Server doesn't support %dx%d (%d fps) or try --unsupported option\n", config->stream.width, config->stream.height, config->stream.fps);
|
||||||
|
else if (ret == GS_NOT_SUPPORTED_SOPS_RESOLUTION)
|
||||||
|
fprintf(stderr, "SOPS isn't supported for the resolution %dx%d, use supported resolution or add --nosops option\n", config->stream.width, config->stream.height);
|
||||||
else if (ret == GS_ERROR)
|
else if (ret == GS_ERROR)
|
||||||
fprintf(stderr, "Gamestream error: %s\n", gs_error);
|
fprintf(stderr, "Gamestream error: %s\n", gs_error);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user