aboutsummaryrefslogtreecommitdiffstats
path: root/common/dynload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/dynload.cpp')
-rw-r--r--common/dynload.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/common/dynload.cpp b/common/dynload.cpp
index 89824f78..98d2c521 100644
--- a/common/dynload.cpp
+++ b/common/dynload.cpp
@@ -3,29 +3,10 @@
#include "dynload.h"
+#include "strutils.h"
#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include <string>
-
-inline std::wstring utf8_to_wstr(const char *str)
-{
- std::wstring ret;
-
- int len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
- if(len > 0)
- {
- ret.resize(len);
- MultiByteToWideChar(CP_UTF8, 0, str, -1, &ret[0], len);
- ret.pop_back();
- }
-
- return ret;
-}
-
void *LoadLib(const char *name)
{
std::wstring wname{utf8_to_wstr(name)};