aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_impl.cpp
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-12-14 14:41:07 +0100
committerDan Gudmundsson <[email protected]>2013-01-09 11:44:28 +0100
commita15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0 (patch)
treeac0d902cd288c5a4d04ab0414b94512653be57c3 /lib/wx/c_src/wxe_impl.cpp
parentb6d75e15b9d6400a61f5ea29fa20c1c6376a4b32 (diff)
downloadotp-a15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0.tar.gz
otp-a15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0.tar.bz2
otp-a15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0.zip
wx: Fix loading icons and cursors in Windows
wxWidgets looked in the wrong executable after icons and cursors, stole wxLua's solution. Also finds wx-2.9 on windows
Diffstat (limited to 'lib/wx/c_src/wxe_impl.cpp')
-rw-r--r--lib/wx/c_src/wxe_impl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index 5f3122d7d8..5442fea618 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -30,6 +30,11 @@
// Ok ugly but needed for wxBufferedDC crash workaround
#define private public
#include <wx/dcbuffer.h>
+
+#if defined(__WXMSW__)
+ #include <wx/msw/private.h> // for wxSetInstance
+#endif
+
#undef private
#include "wxe_impl.h"
@@ -222,6 +227,11 @@ void *wxe_main_loop(void *vpdl)
// This should be done in emulator but it's not in yet.
#ifndef _WIN32
erts_thread_disable_fpe();
+#else
+ // Setup that wxWidgets should look for cursors and icons in
+ // this dll and not in werl.exe (which is the default)
+ HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver"));
+ wxSetInstance((HINSTANCE) WXEHandle);
#endif
result = wxEntry(argc, argv);