mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-13 19:26:02 +00:00
Fix handling of colorspace changes when using CUDA+SDL
This commit is contained in:
@@ -372,6 +372,13 @@ ReadbackRetry:
|
||||
// texture creation for most SDL render backends, we need to recreate
|
||||
// the texture when the colorspace changes.
|
||||
if (frame->colorspace != m_ColorSpace) {
|
||||
#ifdef HAVE_CUDA
|
||||
if (m_CudaGLHelper != nullptr) {
|
||||
delete m_CudaGLHelper;
|
||||
m_CudaGLHelper = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_Texture != nullptr) {
|
||||
SDL_DestroyTexture(m_Texture);
|
||||
m_Texture = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user