diff --git a/src/dlangui/platforms/common/platform.d b/src/dlangui/platforms/common/platform.d index c11c134d..57f28f16 100644 --- a/src/dlangui/platforms/common/platform.d +++ b/src/dlangui/platforms/common/platform.d @@ -1355,6 +1355,9 @@ version (Windows) { // to remove import extern(Windows) int DLANGUIWinMain(void* hInstance, void* hPrevInstance, char* lpCmdLine, int nCmdShow); +} else { + // to remove import + extern int DLANGUImain(string[] args); } /// put "mixin APP_ENTRY_POINT;" to main module of your dlangui based app @@ -1386,6 +1389,11 @@ mixin template APP_ENTRY_POINT() { return 1; } } + } else { + int main(string[] args) + { + return DLANGUImain(args); + } } } diff --git a/src/dlangui/platforms/sdl/sdlapp.d b/src/dlangui/platforms/sdl/sdlapp.d index b05d1948..946e72b7 100644 --- a/src/dlangui/platforms/sdl/sdlapp.d +++ b/src/dlangui/platforms/sdl/sdlapp.d @@ -1260,7 +1260,7 @@ version (Windows) { } } else { - int main(string[] args) + int DLANGUImain(string[] args) { initLogs(); diff --git a/src/dlangui/platforms/windows/winapp.d b/src/dlangui/platforms/windows/winapp.d index fd055ae5..7b6210b7 100644 --- a/src/dlangui/platforms/windows/winapp.d +++ b/src/dlangui/platforms/windows/winapp.d @@ -222,8 +222,8 @@ class Win32Window : Window { version (USE_OPENGL) { //_gl = new GLSupport(); - if (!_glSupport) - _glSupport = new GLSupport(); + if (!_glSupport) + _glSupport = new GLSupport(); } // successful @@ -960,15 +960,15 @@ int myWinMain(void* hInstance, void* hPrevInstance, char* lpCmdLine, int iCmdSho Platform.setInstance(w32platform); - if (!initFontManager()) { - Log.e("******************************************************************"); - Log.e("No font files found!!!"); - Log.e("Currently, only hardcoded font paths implemented."); - Log.e("Probably you can modify sdlapp.d to add some fonts for your system."); - Log.e("TODO: use fontconfig"); - Log.e("******************************************************************"); - assert(false); - } + if (!initFontManager()) { + Log.e("******************************************************************"); + Log.e("No font files found!!!"); + Log.e("Currently, only hardcoded font paths implemented."); + Log.e("Probably you can modify sdlapp.d to add some fonts for your system."); + Log.e("TODO: use fontconfig"); + Log.e("******************************************************************"); + assert(false); + } currentTheme = createDefaultTheme();