Workaround for Wine: It appears that Wine exports SetConsoleIcon() from kernel32.dll, but as soon as we call it the application will be terminated ("Unimplemented function KERNEL32.dll.SetConsoleIcon called"). Consequently we will now detect Wine and avoid calling SetConsoleIcon() under Wine. This way LameXP should work under Wine again.

This commit is contained in:
LoRd_MuldeR 2011-04-17 00:17:43 +02:00
parent 60ac414c30
commit 99bd8c28ff
3 changed files with 8 additions and 3 deletions

View File

@ -20,7 +20,7 @@ a:visited { color: #0000EE; }
<li>Upgraded build environment to Microsoft Visual Studio 2010
<li>Dropping support for Windows 2000 and for Windows XP RTM/SP1, Windows XP needs SP2 or SP3 now!
<li>Added a new translation: Korean
<li>Updated LAME encoder to v3.99.1.0 (2011-04-15), compiled with ICL 12.0.3 and MSVC 10.0
<li>Updated LAME encoder to v3.99.1.0 (2011-04-15), compiled with ICL 12.0.3 and MSVC 10.0 (<a href="http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/history.html?revision=1.127" target="_blank">details</a>)
<li>Updated MediaInfo to v0.7.43 (2011-04-10), compiled with ICL 12.0.3 and MSVC 10.0
<li>Updated language files (big thank-you to all contributors !!!)
</ul><br>

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 2
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 444
#define VER_LAMEXP_BUILD 445
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -689,6 +689,11 @@ bool lamexp_init_qt(int argc, char* argv[])
break;
}
//Check for Wine
QLibrary ntdll("ntdll.dll");
bool isWine = (ntdll.resolve("wine_get_version") != NULL) || (ntdll.resolve("wine_nt_to_unix_file_name") != NULL);
if(isWine) qWarning("It appears we are running under Wine, unexpected things might happen!\n");
//Create Qt application instance and setup version info
QDate date = QDate::currentDate();
QApplication *application = new QApplication(argc, argv);
@ -731,7 +736,7 @@ bool lamexp_init_qt(int argc, char* argv[])
}
//Update console icon, if a console is attached
if(g_lamexp_console_attached)
if(g_lamexp_console_attached && !isWine)
{
typedef DWORD (__stdcall *SetConsoleIconFun)(HICON);
QLibrary kernel32("kernel32.dll");