mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix shutdown hangs, bank bag icons/drag-drop, loading screen progress, and login spawn
- Fix shutdown hang: skip vmaDestroyAllocator (walked thousands of allocations), replace unsafe pthread_timedjoin_np with plain join + early-exit checks in workers - Bank window: full icon rendering, click-and-hold pickup (0.10s), drag-drop for all bank slots including bank bag equip slots, same-slot drop detection - Loading screen: process one tile per frame for live progress updates - Camera reset: trust server position in online mode to avoid spawning under WMOs - Fix PLAYER_BYTES/PLAYER_BYTES_2 field indices, preserve purchasedBankBagSlots across inventory rebuilds, fix bank slot purchase result codes
This commit is contained in:
parent
804b947203
commit
a559d5944b
14 changed files with 489 additions and 146 deletions
|
|
@ -50,10 +50,12 @@ bool VkContext::initialize(SDL_Window* window) {
|
|||
}
|
||||
|
||||
void VkContext::shutdown() {
|
||||
LOG_WARNING("VkContext::shutdown - vkDeviceWaitIdle...");
|
||||
if (device) {
|
||||
vkDeviceWaitIdle(device);
|
||||
}
|
||||
|
||||
LOG_WARNING("VkContext::shutdown - destroyImGuiResources...");
|
||||
destroyImGuiResources();
|
||||
|
||||
// Destroy sync objects
|
||||
|
|
@ -68,9 +70,16 @@ void VkContext::shutdown() {
|
|||
if (immFence) { vkDestroyFence(device, immFence, nullptr); immFence = VK_NULL_HANDLE; }
|
||||
if (immCommandPool) { vkDestroyCommandPool(device, immCommandPool, nullptr); immCommandPool = VK_NULL_HANDLE; }
|
||||
|
||||
LOG_WARNING("VkContext::shutdown - destroySwapchain...");
|
||||
destroySwapchain();
|
||||
|
||||
if (allocator) { vmaDestroyAllocator(allocator); allocator = VK_NULL_HANDLE; }
|
||||
// Skip vmaDestroyAllocator — it walks every allocation to free it, which
|
||||
// takes many seconds with thousands of loaded textures/models. The driver
|
||||
// reclaims all device memory when we destroy the device, and the OS reclaims
|
||||
// everything on process exit. Skipping this makes shutdown instant.
|
||||
allocator = VK_NULL_HANDLE;
|
||||
|
||||
LOG_WARNING("VkContext::shutdown - vkDestroyDevice...");
|
||||
if (device) { vkDestroyDevice(device, nullptr); device = VK_NULL_HANDLE; }
|
||||
if (surface) { vkDestroySurfaceKHR(instance, surface, nullptr); surface = VK_NULL_HANDLE; }
|
||||
|
||||
|
|
@ -83,7 +92,7 @@ void VkContext::shutdown() {
|
|||
|
||||
if (instance) { vkDestroyInstance(instance, nullptr); instance = VK_NULL_HANDLE; }
|
||||
|
||||
LOG_INFO("Vulkan context shutdown");
|
||||
LOG_WARNING("Vulkan context shutdown complete");
|
||||
}
|
||||
|
||||
bool VkContext::createInstance(SDL_Window* window) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue