#include "GMEAppDelegate.h"

GMEAppDelegate& GMEAppDelegate::GetInstance()
{
    static GMEAppDelegate instance;
    return instance;
}



GMEAppDelegate::GMEAppDelegate()
{
}

#if !defined(__APPLE__)
#include "Core.h"
#include <GMESDK/tmg_sdk.h>

static void OnAppDidEnterBackground()
{
	ITMGContextGetInstance()->Pause();
}

static void OnAppWillEnterForeground()
{
	ITMGContextGetInstance()->Resume();
}

void GMEAppDelegate::Initialize()
{
	FCoreDelegates::ApplicationWillDeactivateDelegate.AddStatic(&OnAppDidEnterBackground);
	FCoreDelegates::ApplicationHasReactivatedDelegate.AddStatic(&OnAppWillEnterForeground);
}
#endif

