mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-22 09:57:30 +00:00
fixup
This commit is contained in:
parent
20a0f69e68
commit
9bd0e08877
@ -195,9 +195,12 @@ sc_display_create_texture(struct sc_display *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t texture_id =
|
const char *renderer_name = SDL_GetRendererName(display->renderer);
|
||||||
SDL_GetNumberProperty(props,
|
const char *key = !renderer_name || !strcmp(renderer_name, "opengl")
|
||||||
SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER, 0);
|
? SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER
|
||||||
|
: SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER;
|
||||||
|
|
||||||
|
int64_t texture_id = SDL_GetNumberProperty(props, key, 0);
|
||||||
SDL_DestroyProperties(props);
|
SDL_DestroyProperties(props);
|
||||||
if (!texture_id) {
|
if (!texture_id) {
|
||||||
LOGE("Could not get texture id: %s", SDL_GetError());
|
LOGE("Could not get texture id: %s", SDL_GetError());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user