mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-27 01:17:40 +00:00
renderer_vulkan: Use raw surface handles and improve release logic (#75)
Should fix or at least lessen the crashes when leaving runtime emulation on both Android / PC Also, may have improved the time required to leave the game Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/75 Co-authored-by: Briar <205427297+icy-briar@users.noreply.github.com> Co-committed-by: Briar <205427297+icy-briar@users.noreply.github.com>
This commit is contained in:
@@ -430,6 +430,15 @@ public:
|
||||
return handle != nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases ownership of the managed handle.
|
||||
* The caller is responsible for managing the lifetime of the returned handle.
|
||||
* The Handle object becomes invalid after this call.
|
||||
*/
|
||||
Type release() noexcept {
|
||||
return std::exchange(handle, nullptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
Type handle = nullptr;
|
||||
OwnerType owner = nullptr;
|
||||
@@ -501,6 +510,15 @@ public:
|
||||
return handle != nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases ownership of the managed handle.
|
||||
* The caller is responsible for managing the lifetime of the returned handle.
|
||||
* The Handle object becomes invalid after this call.
|
||||
*/
|
||||
Type release() noexcept {
|
||||
return std::exchange(handle, nullptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
Type handle = nullptr;
|
||||
const Dispatch* dld = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user