Set window icon when the emulator is started#91
Conversation
|
Works on Mac, but
|
|
Should the icon maybe be embedded inside the binary, rather than being a separate file? |
|
@FreeFull That is possible I just thought it would be easier to store the data in a file. I'll work on making the changes requested tomorrow. |
f0107f4 to
9a12a41
Compare
|
It appears that the SDL base library only support bitmaps however there is the SDL_image library which supports other image formats. http://gigi.nullneuron.net/gigilabs/loading-images-in-sdl2-with-sdl_image for example. @mist64 I'm not sure if including the image path matters since the data gets compiled into the binary. |
|
My 2c:
|
|
@madebr I've actually been working on a lua script to export bitmap data as hex values however I haven't quite been able to make it work yet. It's a lot tougher dealing with binary data than I thought. 😄 |
|
@blackknight36 #64 is adding CMake support to enable building on other platforms such as Windows and finally adding CI for all platforms. |
|
@madebr Thanks, I'll give that a shot. I've almost got my own script working as well, just need to fix a few bugs when dealing with padded bitmap data. |
9a12a41 to
0b72df2
Compare
22a53b2 to
8a38a77
Compare
|
Sorry I haven't commented on this for a while. As I understand the code, it doesn't do any error checking if the file is not found, right? |
|
@mist64 That is correct. I can add error checking if needed. |
418c529 to
a80a27c
Compare
|
@madebr I've updated this PR to use SDL_LoadBMP_RW based on the data created by the embed_c.py script. I had to remove the "const" definition to get compilation to succeed. With the const keyword present I get errors as follows. |
a80a27c to
1734ec7
Compare
d711dc1 to
6a9593b
Compare
|
I've removed the icon.xcf file which now lets the build pass. |
|
Thanks for your work, and sorry this is taking so long. I don't want to have a dependency on Python for the build process, so can you check in the resulting .c/.h files in addition to the script and remove the dependency in the Makefile (just make it an optional target)? |
6a9593b to
cdd8711
Compare
cdd8711 to
7858750
Compare
|
@mist64 No problem, I've updated this branch as suggested. |
|
CI is unhappy because of spaces vs. tabs in icon.c |
7858750 to
4d67a01
Compare
I've updated the script to use tabs instead of spaces. CI checks should work now. |
4d67a01 to
36d5267
Compare
36d5267 to
463189b
Compare
|
This is no longer needed. |
This window icon is based on the image displayed on the web site. Fixes #90