I'm making a little game using raylib in C++. I am trying to set the window icon using SetWindowIcon(icon)
, but it doesn't actually set the icon:
const int screenWidth = 1000;
const int screenHeight = 800;
InitWindow(screenWidth, screenHeight, "BulletProof");
const char* gameDirectory = GetWorkingDirectory();
std::string iconPath = std::string(gameDirectory) + "/icon.ico";
Image icon = LoadImage(iconPath.c_str());
SetWindowIcon(icon);
It does not give any error while compiling, and the game opens succesfuly, but icon is not changed. My icon is on .ico
format. (I also tried a .png
format image, but that also did not work).