QTfrontend/CocoaInitializer.mm
author smxx
Tue, 01 Jun 2010 19:33:45 +0000
changeset 3489 aedf289192f5
parent 2400 2422ea85d100
child 3697 d5b30d6373fc
permissions -rw-r--r--
Engine: * Removed horizontal weapon offsets for now (shouldn't affect human player's gameplay but that of AI) Frontend: * Added some main menu tips

/*
 * Copyright (C) 2008 Remko Troncon
 */

#include "CocoaInitializer.h"

#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
#include <QtDebug>

class CocoaInitializer::Private 
{
	public:
		NSAutoreleasePool* autoReleasePool_;
};

CocoaInitializer::CocoaInitializer()
{
	d = new CocoaInitializer::Private();
        c = new CocoaInitializer::Private();
	NSApplicationLoad();
        c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}

CocoaInitializer::~CocoaInitializer()
{
	[d->autoReleasePool_ release];
        [c->autoReleasePool_ release];
	delete c;
	delete d;
}