From a15d14a0c266b9e86c5a2ca39b3c1808a5e1bae0 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 14 Dec 2012 14:41:07 +0100 Subject: 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 --- lib/wx/c_src/wxe_impl.cpp | 10 ++++++++++ lib/wx/configure.in | 9 +++++---- 2 files changed, 15 insertions(+), 4 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 + +#if defined(__WXMSW__) + #include // 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); diff --git a/lib/wx/configure.in b/lib/wx/configure.in index f58c8d92fa..4f717de3f7 100755 --- a/lib/wx/configure.in +++ b/lib/wx/configure.in @@ -416,12 +416,12 @@ else else CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null` fi - CWXWIN3=$CWXWIN_PROG/wxWidgets-2.8 - CWXWIN4=$CWXWIN_PROG/wxMSW-2.8 - CWX_DOCUMENTED="/opt/local/pgm/wxMSW-2.8.* /opt/local/pgm/wxWidgets-2.8.*" + CWXWIN3=$CWXWIN_PROG/wxWidgets-2.*.* + CWXWIN4=$CWXWIN_PROG/wxMSW-2.*.* + CWX_DOCUMENTED="/opt/local/pgm/wxMSW-2.*.* /opt/local/pgm/wxWidgets-2.*.*" case $ac_cv_sizeof_void_p in 8) - CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-2.8.* /opt/local64/pgm/wxWidgets-2.8.* $CWX_DOCUMENTED" + CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-2.*.* /opt/local64/pgm/wxWidgets-2.*.* $CWX_DOCUMENTED" ;; *) true @@ -463,6 +463,7 @@ else fi fi done + if test -z "$WX_LIBS_STATIC"; then AC_MSG_RESULT([failed]) if test X"$WX_BUILDING_INSIDE_ERLSRC" != X"true" ; then -- cgit v1.2.3