mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +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
|
// 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user