diff options
author | bunnei <bunneidev@gmail.com> | 2023-02-19 07:05:58 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:31 +0200 |
commit | 32cf6beee3936ed60ddf0664bdac4983ffd55284 (patch) | |
tree | 144818bf013132b9d05c668eeaadf00e2e30f3b7 /src/common | |
parent | android: EmulationFragment: Always reset overlay. (diff) | |
download | yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar.gz yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar.bz2 yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar.lz yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar.xz yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.tar.zst yuzu-32cf6beee3936ed60ddf0664bdac4983ffd55284.zip |
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/dynamic_library.cpp | 2 | ||||
-rw-r--r-- | src/common/dynamic_library.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/common/dynamic_library.cpp b/src/common/dynamic_library.cpp index 054277a2b..4fabe7e52 100644 --- a/src/common/dynamic_library.cpp +++ b/src/common/dynamic_library.cpp @@ -22,6 +22,8 @@ DynamicLibrary::DynamicLibrary(const char* filename) { void(Open(filename)); } +DynamicLibrary::DynamicLibrary(void* handle_) : handle{handle_} {} + DynamicLibrary::DynamicLibrary(DynamicLibrary&& rhs) noexcept : handle{std::exchange(rhs.handle, nullptr)} {} diff --git a/src/common/dynamic_library.h b/src/common/dynamic_library.h index f42bdf441..662d454d4 100644 --- a/src/common/dynamic_library.h +++ b/src/common/dynamic_library.h @@ -20,6 +20,9 @@ public: /// Automatically loads the specified library. Call IsOpen() to check validity before use. explicit DynamicLibrary(const char* filename); + /// Initializes the dynamic library with an already opened handle. + explicit DynamicLibrary(void* handle_); + /// Moves the library. DynamicLibrary(DynamicLibrary&&) noexcept; DynamicLibrary& operator=(DynamicLibrary&&) noexcept; |