mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-16 02:47:49 +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:
parent
cb8f449dca
commit
559eb0a488
6 changed files with 57 additions and 26 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue