mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-14 04:06:09 +00:00
Set window icon
This commit is contained in:
@@ -566,6 +566,8 @@ static bool IsClientLoggingEnabled(int argc, char** argv) {
|
||||
}
|
||||
|
||||
#if !WINDOWS_STORE
|
||||
extern "C" void cxxbridge1$rust_vec$u8$set_len(rust::Vec<u8>* ptr, std::size_t len) noexcept;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
//TODO: This seems to fix a lot of weird issues with rounding
|
||||
// but breaks animations, need to research why this is the case
|
||||
@@ -609,7 +611,17 @@ int main(int argc, char** argv) {
|
||||
hecl::SetCpuCountOverride(argc, argv);
|
||||
|
||||
auto app = std::make_unique<metaforce::Application>(fileMgr, cvarMgr, cvarCmns);
|
||||
aurora::app_run(std::move(app));
|
||||
auto data = aurora::Icon{};
|
||||
{
|
||||
auto icon = metaforce::GetIcon();
|
||||
data.data.reserve(icon.size);
|
||||
std::memcpy(data.data.data(), icon.data.get(), icon.size);
|
||||
// terrible hack: https://github.com/dtolnay/cxx/issues/990
|
||||
cxxbridge1$rust_vec$u8$set_len(&data.data, icon.size);
|
||||
data.width = icon.width;
|
||||
data.height = icon.height;
|
||||
}
|
||||
aurora::app_run(std::move(app), data);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user