Linux KDE Desktop Loses Hardware Acceleration When SDL2 Runs

Hi,

When I run my SDL2 game from terminal on Linux with KDE
The Windows Aero theme stops working?
(also desktop cube animation stops working as well)

I am using SDL2.0.4 on Linux Mint 18.2 KDE 64Bit.
When I exit the SDL2 game then everything above works again?

Is the above a known issue with this older SDL2.0.4 ?
I use this older version because it’s what is available in Package Manager.
Thanks!

JeZxLee

//-------------------------------------------------------------------------------------------------
bool Visuals::InitializeWindow(void)
{
SDL_Surface* windowIcon = SDL_LoadBMP("data/visuals/icon.bmp");

    Window = NULL;
    Window = SDL_CreateWindow("''TetriCrisis 4 110% A.I. Turbo'' - (C)2016 By 16BitSoft Inc."
                                 , SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_RESIZABLE);

    if (Window == NULL)
    {
        printf( "SDL2 create window failed: %s\n", SDL_GetError() );
        CoreFailure = true;
        return(false);
    }
    else  printf("SDL2 window created.\n");

    WindowWidthCurrent = 640;
    WindowHeightCurrent = 480;

    SDL_SetWindowIcon(Window, windowIcon);

    Renderer = NULL;
    Renderer = SDL_CreateRenderer(Window, -1, SDL_RENDERER_ACCELERATED);

    if (Renderer == NULL)
    {
        printf( "SDL2 create renderer failed: %s\n", SDL_GetError() );
        CoreFailure = true;
        return(false);
    }
    else  printf("SDL2 renderer created.\n");


    return(true);
}

It seems like when I run SDL2 game, my KDE desktop loses hardware acceleration?
Is this a feature of SDL2 on Linux or a possible bug?
Thanks!

I am running SDL2 on Linux Mint 18.2 KDE 64Bit.
It’s a custom thin client desktop with 7th generation Intel HD GPU…

JeZxLee

Not 100% sure, but this seems to be a feature of SDL 2.0.4 on KDE Linux.
(was hoping someone can confirm this)
I tried the SDL2 game on two different KDE desktops with same result.
Thanks!

JeZxLee

Hi

I also have the latest Mint KDE, but I don’t have any problem with I run my SDL2 app.
the opengl desktop effects still work fine