aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu/application.cpp')
-rw-r--r--src/menu/application.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/menu/application.cpp b/src/menu/application.cpp
index 49581227..45f7af0e 100644
--- a/src/menu/application.cpp
+++ b/src/menu/application.cpp
@@ -38,16 +38,22 @@ namespace usdx
Application* Application::instance = NULL;
Application::Application(Container* parent)
- : Container(parent), display(NULL), fps_manager(NULL),
+ : Container(parent), config(NULL), display(NULL), fps_manager(NULL),
running(false), frames_per_second(50)
{
set_size(800, 600);
log4cpp::PropertyConfigurator::configure("log4cpp.property");
+ config = new Config();
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
}
Application::~Application()
{
+ if (config) {
+ delete config;
+ config = NULL;
+ }
+
if (fps_manager) {
delete fps_manager;
fps_manager = NULL;
@@ -68,6 +74,11 @@ namespace usdx
return instance;
}
+ Config* Application::get_config(void)
+ {
+ return get_instance()->config;
+ }
+
void Application::main_loop(SDL_Surface* display)
{
SDL_Event event;