mirror of https://github.com/buggins/dlangui.git
Merge pull request #401 from tom-tan/fix-unittest-windows
Fix failure in unittest on Windows systems
This commit is contained in:
commit
5b96e81d1e
|
@ -1896,16 +1896,19 @@ mixin template APP_ENTRY_POINT() {
|
||||||
} else {
|
} else {
|
||||||
/// workaround for link issue when WinMain is located in library
|
/// workaround for link issue when WinMain is located in library
|
||||||
version(Windows) {
|
version(Windows) {
|
||||||
extern (Windows) int WinMain(void* hInstance, void* hPrevInstance,
|
version (unittest) {
|
||||||
char* lpCmdLine, int nCmdShow)
|
} else {
|
||||||
{
|
extern (Windows) int WinMain(void* hInstance, void* hPrevInstance,
|
||||||
try {
|
char* lpCmdLine, int nCmdShow)
|
||||||
int res = DLANGUIWinMain(hInstance, hPrevInstance,
|
{
|
||||||
lpCmdLine, nCmdShow);
|
try {
|
||||||
return res;
|
int res = DLANGUIWinMain(hInstance, hPrevInstance,
|
||||||
} catch (Exception e) {
|
lpCmdLine, nCmdShow);
|
||||||
Log.e("Exception: ", e);
|
return res;
|
||||||
return 1;
|
} catch (Exception e) {
|
||||||
|
Log.e("Exception: ", e);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue