这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@adambonneruk
Copy link
Contributor

@adambonneruk adambonneruk commented Jul 4, 2023

Hi K4zmu2a, I love your work! this PR is to update the embedded windows .ico file to support the modern/larger 256x256 format. Example here (left-to-right: current, new, and firefox for reference)

image

For your info, i'll outline the steps used to create this icon (per my installer repo):

  1. Using k4zmu2a's 192px icon .png file
  2. Uploaded to AI resizer https://bigjpg.com/ with 4x resize (free mode) generating a 768px image
  3. New 768px image brought into Paint.net
  4. Paint.net Steps:
    • Resize to 256px
    • Used blown-up original 48px icon for placement and shadow details
    • Created shadow
    • Exported as .png
    • Saved .pdn file for prosperity
  5. IcoFX Steps:
    • Opened Icon_1.ico from k4mu2a
    • Added new 256px as 256x256 32bit with Alpha
    • Saved as .ico

My understanding is my accepting this PR will mean future compilations of your source into .exe format will automatically pick up and utilise these changes (really looking forward to 2.1.0 whenever it ships!).

Note: this is my first ever public PR 🤞 I hope it's a worthy addition!

thank you,
Adam

@k4zmu2a k4zmu2a merged commit 62e20b1 into k4zmu2a:master Jul 11, 2023
@k4zmu2a
Copy link
Owner

k4zmu2a commented Jul 11, 2023

Hello Adam.
It is nice to see another pinball enjoyer.

This PR is a great idea - having upscaled icons for Linux, using them for Windows makes sense.
You are correct - the build is setup to use Icon_1.ico file as the icon resource.

In my tests, your .ico file failed to render at x265 when baked into an exe (on both win10 and 11).
There can be many different causes for that, N1 suspect being Windows thumbnail cache.
I tried a few things:
• Generating 24bit icons with single color transparency (works, but looks worse and increases file size)
• Re-importing x265 in a convoluted way: exe compiled with your icon -> raw .png resx-> import .png into original 3PBD .ico file
The second thing seemed to work on both machines, so that is what I went with in this PR.

@k4zmu2a
Copy link
Owner

k4zmu2a commented Jul 11, 2023

Here is a build after PR merge, for you to check if this new icon works as expected:
SpaceCadetPinball_x86_V2.1.0Dev.zip

This build is quite close to 2.1.0Rel, one might even call it RC)

@adambonneruk
Copy link
Contributor Author

I've seen similar issues with the windows icon cache too, typically just renaming the .exe to something different will show you the correct icon as a quick workaround until it catches up/refreshes manually. I'm sure theres a way to reload the cache quickly but I havent figured that out just yet

You mention 265 in your reply I guess you meant 256 (i dont know what would happen if you tried to load a 265x265 icon!)

I'm really happy this idea works and is accepted! thanks

I've checked your exe and the icon works great, I'm unable to play the game with it though (using default pinball files and the x86 sdl files), load error here:

image

@k4zmu2a
Copy link
Owner

k4zmu2a commented Jul 11, 2023

The adjusted icon works as indented, that is good news.
I was indeed talking about 256x256 icon (aka subj of this PR).
The game now uses somewhat fresh version of SDL, which I failed to include.
That RenderGeometryRaw call is for HW GUI renderer.
SW/HW GUI is a compile time option; older SDL version would have worked with SW GUI.
Here is the same build, but this time with all dependencies:
SpaceCadetPinball_v2.0.1RC.zip

You are very welcome.
Thanks to you, modern Windows users will have one less program with weird/outdated icon.
This high DPI icon idea never occurred to me, I just applied classic icon and never thought about it again)

@adambonneruk adambonneruk deleted the new-256x256-icon branch July 11, 2023 12:33
@adambonneruk
Copy link
Contributor Author

The adjusted icon works as indented, that is good news. I was indeed talking about 256x256 icon (aka subj of this PR). The game now uses somewhat fresh version of SDL, which I failed to include. That RenderGeometryRaw call is for HW GUI renderer. SW/HW GUI is a compile time option; older SDL version would have worked with SW GUI. Here is the same build, but this time with all dependencies: SpaceCadetPinball_v2.0.1RC.zip

You are very welcome. Thanks to you, modern Windows users will have one less program with weird/outdated icon. This high DPI icon idea never occurred to me, I just applied classic icon and never thought about it again)

FYI The file you attached looked even older (v2.0.1-rc e.g its missing the 256px icon) that the last one (v2.1.0-dev). I've tried lots of cominations of .exe and .dll with no luck

@k4zmu2a
Copy link
Owner

k4zmu2a commented Jul 21, 2023

Yep, that was indeed some old RC build, foiled again by Win11 UI.
I was meaning to attach this build, sorry for the confusion:
SpaceCadetPinball_x86_V2.1.0Dev.zip

@adambonneruk
Copy link
Contributor Author

works like a treat, nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants