Set the window icon from the module resource pool

Makes use of the stb_image library
Conversion to HICON seems to have broken somewhere
This commit is contained in:
x1nixmzeng
2016-01-07 01:32:56 +00:00
parent 321e2d8873
commit 92c8409b0a
6 changed files with 60 additions and 13 deletions

View File

@@ -526,9 +526,13 @@ X_STATUS Emulator::CompleteLaunch(const std::wstring& path,
if (xdb_ptr != nullptr) {
xe::xdbf::XdbfWrapper db;
if (db.initialize(xdb_ptr, static_cast<size_t>(resource_size))) {
// TODO(x1nixmzeng): Set the application icon
std::wstring title(xe::to_wstring(xe::xdbf::get_title(db)));
display_window_->set_title(title);
xe::xdbf::XdbfBlock icon_block = xe::xdbf::get_icon(db);
if (icon_block.buffer != nullptr) {
display_window_->set_icon_from_buffer(icon_block.buffer, icon_block.size);
}
}
}
}