Commit 1cf1c047 authored by Jan Möbius's avatar Jan Möbius

Make console activation easier

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15817 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2f23cf72
......@@ -72,13 +72,10 @@
#include <omp.h>
#endif
// Includes for windows debugging console
#ifdef WIN32
#ifndef NDEBUG
#include <fcntl.h>
#include <io.h>
#endif
#include <fcntl.h>
#include <io.h>
#endif
......@@ -229,7 +226,6 @@ void segfaultHandling (int) {
}
#ifdef WIN32
#ifndef NDEBUG
void getConsole() {
//Create a console for this application
AllocConsole();
......@@ -252,7 +248,6 @@ void segfaultHandling (int) {
*stdin = *CInputHandle;
setvbuf(stdin, NULL, _IONBF, 0);
}
#endif
#endif
bool openPolyMeshes = false;
......@@ -319,12 +314,6 @@ bool parseCommandLineOptions(CSimpleOpt& args){
int main(int argc, char **argv)
{
#ifdef WIN32
#ifndef NDEBUG
getConsole();
#endif
#endif
// Remove -psn_0_xxxxx argument which is automatically
// attached by MacOSX
for (int i = 0; i < argc; i++) {
......@@ -333,8 +322,8 @@ int main(int argc, char **argv)
( (argv[i])[1] == 'p' ) &&
( (argv[i])[2] == 's' ) &&
( (argv[i])[3] == 'n' ) ) {
argc--;
argv[i] = (char *)"";
argc--;
argv[i] = (char *)"";
}
}
}
......@@ -361,6 +350,12 @@ int main(int argc, char **argv)
OpenFlipper::Options::windowTitle("OpenFlipper v" + OpenFlipper::Options::coreVersion());
#ifdef WIN32
#ifndef NDEBUG
getConsole();
#endif
#endif
if ( !OpenFlipper::Options::nogui() ) {
// OpenGL check
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment