New comment by atk on void-packages repository https://github.com/void-linux/void-packages/pull/32824#issuecomment-1330597825 Comment: Why don't we just extract the required patches and put them in our template in the meantime so we can release this package? I mean, we are already applying two patches, what's one more? Also, I don't see too much progress on that release of etl-2.81.0, there are still 9 issues open. e.g. loading_crash_fix.patch: ```diff diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c index fb629055d..4074a9003 100644 --- a/src/sdl/sdl_glimp.c +++ b/src/sdl/sdl_glimp.c @@ -141,6 +141,28 @@ void GLimp_Minimize(void) SDL_MinimizeWindow(main_window); } +/** + * @brief Flash the game window in the taskbar to alert user of an event + * @param[in] state - SDL_FlashOperation + */ +void GLimp_FlashWindow(int state) +{ +#if SDL_VERSION_ATLEAST(2, 0, 16) + if (state == 1) + { + SDL_FlashWindow(main_window, SDL_FLASH_BRIEFLY); + } + else if (state == 2) + { + SDL_FlashWindow(main_window, SDL_FLASH_UNTIL_FOCUSED); + } + else + { + SDL_FlashWindow(main_window, SDL_FLASH_CANCEL); + } +#endif +} + /** * @brief GLimp_GetModeInfo * @param[in,out] width @@ -1059,51 +1081,34 @@ static qboolean GLimp_StartDriverAndSetMode(glconfig_t *glConfig, int mode, qboo */ void GLimp_Splash(glconfig_t *glConfig) { - unsigned char splashData[SPLASH_DATA_SIZE]; // width * height * bytes_per_pixel - SDL_Surface *splashImage = NULL; - - // decode splash image - SPLASH_IMAGE_RUN_LENGTH_DECODE(splashData, - CLIENT_WINDOW_SPLASH.rle_pixel_data, - CLIENT_WINDOW_SPLASH.width * CLIENT_WINDOW_SPLASH.height, - CLIENT_WINDOW_SPLASH.bytes_per_pixel); - - // get splash image - splashImage = SDL_CreateRGBSurfaceFrom( - (void *)splashData, - CLIENT_WINDOW_SPLASH.width, - CLIENT_WINDOW_SPLASH.height, - CLIENT_WINDOW_SPLASH.bytes_per_pixel * 8, - CLIENT_WINDOW_SPLASH.bytes_per_pixel * CLIENT_WINDOW_SPLASH.width, -#ifdef Q3_LITTLE_ENDIAN - 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 -#else - 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF -#endif - ); - - SDL_Rect dstRect; - dstRect.x = glConfig->windowWidth / 2 - splashImage->w / 2; - dstRect.y = glConfig->windowHeight / 2 - splashImage->h / 2; - dstRect.w = splashImage->w; - dstRect.h = splashImage->h; - - SDL_Surface *surface = SDL_GetWindowSurface(main_window); - if (!surface) - { - // This happens on some platforms, most likely just the SDL build lacking renderers. Does not really matter tho. - // the user just wont see our awesome splash screen, but the renderer should boot up just fine. - // FIXME: maybe checkup on this later on if there's something we should change on the bundled sdl compile settings - Com_DPrintf(S_COLOR_YELLOW "Could not get fetch SDL surface: %s\n", SDL_GetError()); - } - else if (SDL_BlitSurface(splashImage, NULL, surface, &dstRect) == 0) // apply image on surface - { - SDL_UpdateWindowSurface(main_window); - } - else - { - Com_Printf(S_COLOR_YELLOW "SDL_BlitSurface failed - %s\n", SDL_GetError()); - } + const char *image_path = "regular.bmp"; + SDL_Surface *splashImage = NULL; + SDL_Texture *texture = NULL; + + splashImage = SDL_LoadBMP(image_path); + + if(splashImage == NULL) + { + Com_DPrintf(S_COLOR_YELLOW "Could not get image: %s\n", SDL_GetError()); + } + + SDL_Surface *surface = SDL_GetWindowSurface(main_window); + if (!surface) + { + // This happens on some platforms, most likely just the SDL build lacking renderers. Does not really matter tho. + // the user just wont see our awesome splash screen, but the renderer should boot up just fine. + // FIXME: maybe checkup on this later on if there's something we should change on the bundled sdl compile settings + Com_DPrintf(S_COLOR_YELLOW "Could not get fetch SDL surface: %s\n", SDL_GetError()); + } + + texture = SDL_CreateTextureFromSurface(main_renderer, surface); + + if (!texture) + { + Com_DPrintf(S_COLOR_YELLOW "SDL_CreateTextureFromSurface failed - %s\n", SDL_GetError()); + } + SDL_QueryTexture(texture, NULL, NULL, &glConfig->windowWidth, &glConfig->windowHeight); + //SDL_UpdateWindowSurface(main_window); SDL_FreeSurface(splashImage); } ``` That should suffice.