Github messages for voidlinux
 help / color / mirror / Atom feed
From: atk <atk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [WIP] New package: etlegacy-2.80.2
Date: Tue, 29 Nov 2022 13:43:55 +0100	[thread overview]
Message-ID: <20221129124355.09nRsVzyRVaRoshBctq408SPu0UDcD-nGoJrbua4VlE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-32824@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 4499 bytes --]

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.

  parent reply	other threads:[~2022-11-29 12:43 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 19:07 [PR PATCH] New package: etlegacy-2.77.1 biopsin
2021-09-03 19:34 ` [PR PATCH] [Updated] " biopsin
2021-09-03 20:05 ` [PR REVIEW] " Chocimier
2021-09-03 20:05 ` Chocimier
2021-09-03 20:05 ` Chocimier
2021-09-03 20:11 ` biopsin
2021-09-04 18:17 ` biopsin
2021-09-04 18:24 ` Chocimier
2021-09-04 18:27 ` [PR REVIEW] " q66
2021-09-04 18:38 ` biopsin
2021-09-04 20:16 ` ericonr
2021-09-04 20:47 ` biopsin
2021-09-04 20:50 ` biopsin
2021-09-07 13:54 ` [PR REVIEW] " biopsin
2021-09-11 15:09 ` [PR PATCH] [Updated] " biopsin
2021-09-11 15:20 ` [PR PATCH] [Updated] [WIP] " biopsin
2021-09-11 15:28 ` biopsin
2021-09-12  9:02 ` biopsin
2021-09-12  9:03 ` biopsin
2021-09-12 16:31 ` [PR REVIEW] " q66
2021-09-12 16:31 ` q66
2021-09-12 18:21 ` [PR PATCH] [Updated] " biopsin
2021-09-12 18:23 ` [PR REVIEW] " biopsin
2021-09-12 18:26 ` biopsin
2021-09-12 21:26 ` q66
2021-09-12 21:26 ` q66
2021-09-13  5:45 ` [PR PATCH] [Updated] " biopsin
2021-09-13  6:16 ` biopsin
2021-09-13 12:39 ` q66
2021-09-13 12:42 ` q66
2021-09-13 12:44 ` q66
2021-09-13 12:46 ` q66
2021-09-13 16:15 ` biopsin
2021-09-13 17:16 ` [PR REVIEW] " Chocimier
2021-09-13 17:16 ` Chocimier
2021-09-13 17:16 ` Chocimier
2021-09-13 17:16 ` Chocimier
2021-09-13 17:16 ` Chocimier
2021-09-13 17:16 ` Chocimier
2021-09-14  6:57 ` [PR PATCH] [Updated] " biopsin
2021-10-01 17:40 ` [PR PATCH] [Updated] " biopsin
2021-10-01 17:41 ` biopsin
2021-10-01 18:19 ` biopsin
2021-10-01 19:48 ` [PR PATCH] [Updated] " biopsin
2021-10-04  7:01 ` biopsin
2021-10-04 16:20 ` [PR REVIEW] New package: etlegacy-2.78.0 Chocimier
2021-10-04 18:25 ` [PR PATCH] [Updated] " biopsin
2021-10-04 18:26 ` [PR REVIEW] " biopsin
2021-11-03 11:49 ` [PR PATCH] [Updated] " biopsin
2021-12-26  9:22 ` [PR PATCH] [Updated] New package: etlegacy-2.78.1 biopsin
2022-04-13  6:03 ` [PR PATCH] [Updated] New package: etlegacy-2.79.0 biopsin
2022-07-13  2:15 ` github-actions
2022-07-13  7:07 ` [PR PATCH] [Updated] " biopsin
2022-07-13  7:11 ` [WIP] New package: etlegacy-2.80.2 biopsin
2022-07-13  7:11 ` [PR PATCH] [Updated] " biopsin
2022-07-13  7:15 ` biopsin
2022-07-13  7:17 ` biopsin
2022-09-18 13:29 ` biopsin
2022-09-20  9:12 ` atk
2022-09-20 11:22 ` biopsin
2022-09-21 19:24 ` rafal1137
2022-11-29 12:43 ` atk [this message]
2023-02-28  2:01 ` github-actions
2023-02-28 12:29 ` rafal1137
2023-03-25 10:09 ` [PR PATCH] [Updated] " biopsin
2023-03-25 10:30 ` [WIP] New package: etlegacy-2.81.1 biopsin
2023-06-24  2:05 ` github-actions
2023-07-08  2:05 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129124355.09nRsVzyRVaRoshBctq408SPu0UDcD-nGoJrbua4VlE@z \
    --to=atk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).