mirror of https://github.com/buggins/dlangui.git
main() refactoring
This commit is contained in:
parent
e592462f6b
commit
d97cec9522
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1260,7 +1260,7 @@ version (Windows) {
|
|||
}
|
||||
} else {
|
||||
|
||||
int main(string[] args)
|
||||
int DLANGUImain(string[] args)
|
||||
{
|
||||
|
||||
initLogs();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue