[Orxonox-commit 3404] r8091 - in code/branches/mac_osx/src: . libraries/core
youngk at orxonox.net
youngk at orxonox.net
Fri Mar 18 10:13:27 CET 2011
Author: youngk
Date: 2011-03-18 10:13:27 +0100 (Fri, 18 Mar 2011)
New Revision: 8091
Modified:
code/branches/mac_osx/src/Orxonox.cc
code/branches/mac_osx/src/libraries/core/GraphicsManager.cc
Log:
Dang! Forgot something very serious. Now my changes won't be breaking anymore :)
Modified: code/branches/mac_osx/src/Orxonox.cc
===================================================================
--- code/branches/mac_osx/src/Orxonox.cc 2011-03-18 09:00:27 UTC (rev 8090)
+++ code/branches/mac_osx/src/Orxonox.cc 2011-03-18 09:13:27 UTC (rev 8091)
@@ -61,8 +61,16 @@
try
{
#ifndef ORXONOX_USE_WINMAIN
+
+// On Apples, the kernel supplies a second argument, which we have to circumvent
+#ifdef ORXONOX_PLATFORM_APPLE
+# define MAC_ARGC_HACK 2
+#else
+# define MAC_ARGC_HACK 1
+#endif
+
std::string strCmdLine;
- for (int i = 2; i < argc; ++i)
+ for (int i = MAC_ARGC_HACK; i < argc; ++i)
strCmdLine = strCmdLine + argv[i] + ' ';
#endif
Modified: code/branches/mac_osx/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/mac_osx/src/libraries/core/GraphicsManager.cc 2011-03-18 09:00:27 UTC (rev 8090)
+++ code/branches/mac_osx/src/libraries/core/GraphicsManager.cc 2011-03-18 09:13:27 UTC (rev 8091)
@@ -314,15 +314,6 @@
Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
-// HACK
-//#ifdef ORXONOX_PLATFORM_APPLE
-// //INFO: This will give our window focus, and not lock it to the terminal
-// ProcessSerialNumber psn = {0, kCurrentProcess};
-// TransformProcessType(&psn, kProcessTransformToForegroundApplication);
-// SetFrontProcess(&psn);
-//#endif
-// End of HACK
-
// create a full screen default viewport
// Note: This may throw when adding a viewport with an existing z-order!
// But in our case we only have one viewport for now anyway, therefore
More information about the Orxonox-commit
mailing list