QTfrontend/CocoaInitializer.mm
author smaxx
Wed, 06 Oct 2010 22:36:41 +0200
changeset 3932 2fc211f60015
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
Engine: * Temporary fix to log file writing when running from command line (standalone demo/savegame playback) Frontend: * Added a button to the settings menu to associate demos and savegames (.hwd/.hws) with the engine in Windows Explorer and other programs such as web browsers (Win32 only)

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