mirror of https://github.com/aseprite/aseprite.git
37 lines
585 B
C++
37 lines
585 B
C++
// SHE library
|
|
// Copyright (C) 2016 David Capello
|
|
//
|
|
// This file is released under the terms of the MIT license.
|
|
// Read LICENSE.txt for more information.
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "base/debug.h"
|
|
#include "she/system.h"
|
|
|
|
namespace she {
|
|
|
|
static System* g_system = nullptr;
|
|
|
|
System* create_system_impl(); // Defined on each back-end
|
|
|
|
System* create_system()
|
|
{
|
|
ASSERT(!g_system);
|
|
return g_system = create_system_impl();
|
|
}
|
|
|
|
System* instance()
|
|
{
|
|
return g_system;
|
|
}
|
|
|
|
void set_instance(System* system)
|
|
{
|
|
g_system = system;
|
|
}
|
|
|
|
} // namespace she
|