Files
o3de/Code/Editor/Plugins/PerforcePlugin/main.cpp
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

51 lines
1.3 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "PerforcePlugin_precompiled.h"
#include "PerforcePlugin.h"
#include "Include/ISourceControl.h"
#include "Include/IEditorClassFactory.h"
#include "PerforceSourceControl.h"
#include <AzCore/PlatformDef.h>
CPerforceSourceControl* g_pPerforceControl = 0;
PLUGIN_API IPlugin* CreatePluginInstance(PLUGIN_INIT_PARAM* pInitParam)
{
if (pInitParam->pluginVersion != SANDBOX_PLUGIN_SYSTEM_VERSION)
{
pInitParam->outErrorCode = IPlugin::eError_VersionMismatch;
return 0;
}
ModuleInitISystem(GetIEditor()->GetSystem(), "PerforcePlugin");
g_pPerforceControl = new CPerforceSourceControl();
pInitParam->pIEditorInterface->GetClassFactory()->RegisterClass(g_pPerforceControl);
return new CPerforcePlugin();
}
#ifdef AZ_PLATFORM_WINDOWS
HINSTANCE g_hInstance = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, ULONG fdwReason, [[maybe_unused]] LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
g_hInstance = hinstDLL;
//DisableThreadLibraryCalls(hInstance);
}
return(TRUE);
}
#endif