mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Merge large parts of nakeee's "Soap" branch into trunk, after fixing a few crash bugs in FileUtil.cpp.
Not really anything interesting, just some better comments, some slightly more portable/cleaner code in places. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2459 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,19 +24,31 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
// Abstracts the (few) differences between dynamically loading DLLs under Windows
|
||||
// and .so / .dylib under Linux/MacOSX.
|
||||
/* Abstracts the (few) differences between dynamically loading DLLs under
|
||||
Windows and .so / .dylib under Linux/MacOSX. */
|
||||
class DynamicLibrary
|
||||
{
|
||||
public:
|
||||
DynamicLibrary();
|
||||
|
||||
// Loads the library filename
|
||||
int Load(const char *filename);
|
||||
|
||||
// Unload the current library
|
||||
int Unload();
|
||||
|
||||
// Gets a pointer to the function symbol of funcname by getting it from the
|
||||
// share object
|
||||
void *Get(const char *funcname) const;
|
||||
|
||||
// Returns true is the library is loaded
|
||||
bool IsLoaded() const { return library != 0; }
|
||||
|
||||
private:
|
||||
// name of the library file
|
||||
std::string library_file;
|
||||
|
||||
// Library handle
|
||||
#ifdef _WIN32
|
||||
HINSTANCE library;
|
||||
#else
|
||||
@ -44,4 +56,4 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // DYNAMICLIBRARY
|
||||
|
Reference in New Issue
Block a user