QTfrontend/CocoaInitializer.mm
author smxx
Fri, 28 May 2010 20:05:22 +0000
changeset 3485 ab91c56a9050
parent 2400 2422ea85d100
child 3697 d5b30d6373fc
permissions -rw-r--r--
Engine (Henek): * Moved some utility weapons to a new 10th row * Added adjustable flame output to Flamethrower (left/right controls power/intensity) * Added fuel display to flame thrower Frontend: * Added support to bind the new 10th row (default: F10)

/*
 * 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;
}