Fix running Editor or Game target with console on Windows
This commit is contained in:
@@ -41,7 +41,8 @@ public class Main : EngineModule
|
||||
/*{
|
||||
options.PrivateDefinitions.Add("USE_VS_MEM_LEAKS_CHECK");
|
||||
}*/
|
||||
|
||||
if (options.LinkEnv.LinkAsConsoleProgram)
|
||||
options.CompileEnv.PreprocessorDefinitions.Add("PLAIN_MAIN");
|
||||
break;
|
||||
case TargetPlatform.UWP:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "UWP"));
|
||||
|
||||
@@ -25,13 +25,13 @@ extern "C" {
|
||||
__declspec(dllexport) int32 AmdPowerXpressRequestHighPerformance = 1;
|
||||
}
|
||||
|
||||
#if FLAX_TESTS
|
||||
#if PLAIN_MAIN
|
||||
int main(int argc, char* argv[])
|
||||
#else
|
||||
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
|
||||
#endif
|
||||
{
|
||||
#if FLAX_TESTS
|
||||
#if PLAIN_MAIN
|
||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||
LPTSTR lpCmdLine = GetCommandLineW();
|
||||
#endif
|
||||
|
||||
@@ -44,6 +44,9 @@ public class FlaxEditor : EngineTarget
|
||||
{
|
||||
base.SetupTargetEnvironment(options);
|
||||
|
||||
// Uncomment to get console
|
||||
//options.LinkEnv.LinkAsConsoleProgram = true;
|
||||
|
||||
// Setup output folder for Editor binaries
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user