mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-09-20 14:11:54 +00:00
Fix handling of colorspace changes when using CUDA+SDL
This commit is contained in:
parent
e9edad6f8c
commit
1b96b18bc0
1 changed files with 7 additions and 0 deletions
|
@ -372,6 +372,13 @@ ReadbackRetry:
|
||||||
// texture creation for most SDL render backends, we need to recreate
|
// texture creation for most SDL render backends, we need to recreate
|
||||||
// the texture when the colorspace changes.
|
// the texture when the colorspace changes.
|
||||||
if (frame->colorspace != m_ColorSpace) {
|
if (frame->colorspace != m_ColorSpace) {
|
||||||
|
#ifdef HAVE_CUDA
|
||||||
|
if (m_CudaGLHelper != nullptr) {
|
||||||
|
delete m_CudaGLHelper;
|
||||||
|
m_CudaGLHelper = nullptr;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_Texture != nullptr) {
|
if (m_Texture != nullptr) {
|
||||||
SDL_DestroyTexture(m_Texture);
|
SDL_DestroyTexture(m_Texture);
|
||||||
m_Texture = nullptr;
|
m_Texture = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue