mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-17 22:38:38 +01:00
Stop setting window icons on windows
Also fix font editor builds on windows and add more font editor builds to the ghactions workflow. Funny, we don't really need resource.h anymore. The resource compiler does, but we don't.
This commit is contained in:
parent
7bfce3e4a8
commit
dd7178dbc8
9
.github/build.sh
vendored
9
.github/build.sh
vendored
@ -143,10 +143,15 @@ meson_configure+=$'\t'-Db_strip=false
|
||||
meson_configure+=$'\t'-Db_staticpic=false
|
||||
meson_configure+=$'\t'-Dinstall_check=true
|
||||
meson_configure+=$'\t'-Dmod_id=$MOD_ID
|
||||
if [[ $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC == x86_64-linux-gnu ]]; then
|
||||
case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_DEBUG_RELEASE in
|
||||
x86_64-linux-gnu-debug) ;&
|
||||
x86_64-windows-mingw-debug) ;&
|
||||
x86_64-windows-msvc-debug) ;&
|
||||
x86_64-darwin-macos-debug)
|
||||
meson_configure+=$'\t'-Dbuild_render=true
|
||||
meson_configure+=$'\t'-Dbuild_font=true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
|
||||
meson_configure+=$'\t'-Dstatic=prebuilt
|
||||
if [[ $BSH_HOST_PLATFORM == windows ]]; then
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "gui/Style.h"
|
||||
#include "gui/interface/Engine.h"
|
||||
|
||||
#define INCLUDE_SYSWM
|
||||
#include "SDLCompat.h"
|
||||
|
||||
int desktopWidth = 1280, desktopHeight = 1024;
|
||||
@ -139,23 +138,6 @@ int SDLOpen()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIN
|
||||
SDL_SysWMinfo SysInfo;
|
||||
SDL_VERSION(&SysInfo.version);
|
||||
if(SDL_GetWindowWMInfo(sdl_window, &SysInfo) <= 0)
|
||||
{
|
||||
printf("%s : %p\n", SDL_GetError(), SysInfo.info.win.window);
|
||||
exit(-1);
|
||||
}
|
||||
HWND WindowHandle = SysInfo.info.win.window;
|
||||
|
||||
// Use GetModuleHandle to get the Exe HMODULE/HINSTANCE
|
||||
HMODULE hModExe = GetModuleHandle(NULL);
|
||||
HICON hIconSmall = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, LR_SHARED);
|
||||
HICON hIconBig = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 32, 32, LR_SHARED);
|
||||
SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
|
||||
SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
|
||||
#endif
|
||||
#ifdef LIN
|
||||
std::vector<pixel> imageData;
|
||||
int imgw, imgh;
|
||||
|
@ -53,7 +53,6 @@
|
||||
#include "gui/interface/Engine.h"
|
||||
#include "gui/interface/Keys.h"
|
||||
|
||||
#define INCLUDE_SYSWM
|
||||
#include "SDLCompat.h"
|
||||
|
||||
int desktopWidth = 1280, desktopHeight = 1024;
|
||||
@ -195,23 +194,6 @@ void SDLOpen()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIN
|
||||
SDL_SysWMinfo SysInfo;
|
||||
SDL_VERSION(&SysInfo.version);
|
||||
if(SDL_GetWindowWMInfo(sdl_window, &SysInfo) <= 0)
|
||||
{
|
||||
printf("%s : %p\n", SDL_GetError(), SysInfo.info.win.window);
|
||||
exit(-1);
|
||||
}
|
||||
HWND WindowHandle = SysInfo.info.win.window;
|
||||
|
||||
// Use GetModuleHandle to get the Exe HMODULE/HINSTANCE
|
||||
HMODULE hModExe = GetModuleHandle(NULL);
|
||||
HICON hIconSmall = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 16, 16, LR_SHARED);
|
||||
HICON hIconBig = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 32, 32, LR_SHARED);
|
||||
SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
|
||||
SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
|
||||
#endif
|
||||
#ifdef LIN
|
||||
std::vector<pixel> imageData;
|
||||
int imgw, imgh;
|
||||
|
@ -32,7 +32,6 @@
|
||||
# include <shlwapi.h>
|
||||
# include <windows.h>
|
||||
# include <direct.h>
|
||||
# include "resource.h"
|
||||
#else
|
||||
# include <sys/stat.h>
|
||||
# include <unistd.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user