Fix Bug on C4droid

This commit is contained in:
Kirigaya Kazuto 2017-01-04 00:19:46 +08:00
parent df5c80e99e
commit df0695a9d8
6 changed files with 36 additions and 10 deletions

View File

@ -111,3 +111,7 @@ InitManager_Mix::~InitManager_Mix()
Mix_Quit(); Mix_Quit();
} }
InitManager_SDL* syssdl=NULL;
InitManager_IMG* sysimg=NULL;
InitManager_TTF* systtf=NULL;
InitManager_Mix* sysmix=NULL;

View File

@ -37,7 +37,7 @@ public:
~InitManager_Mix(); ~InitManager_Mix();
}; };
extern InitManager_SDL syssdl; extern InitManager_SDL* syssdl;
extern InitManager_IMG sysimg; extern InitManager_IMG* sysimg;
extern InitManager_TTF systtf; extern InitManager_TTF* systtf;
extern InitManager_Mix sysmix; extern InitManager_Mix* sysmix;

View File

@ -1,5 +1,9 @@
#pragma once #pragma once
#ifdef __C4DROID__
#define _WINDOW_PROGRAM
#endif // __C4DROID__
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -1,17 +1,13 @@
#include "config.h" #include "config.h"
#include "App.h" #include "App.h"
InitManager_SDL syssdl;
InitManager_IMG sysimg;
InitManager_TTF systtf;
InitManager_Mix sysmix;
int main() int main()
{ {
mlog_init(); AllInit();
/// Create The Default Window Instance /// Create The Default Window Instance
WindowManager::getDefaultInstance(); WindowManager::getDefaultInstance();
App::Main(); App::Main();
WindowManager::releaseDefaultInstance(); WindowManager::releaseDefaultInstance();
AllQuit();
return 0; return 0;
} }

View File

@ -1 +1,20 @@
#include "mini_engine.h" #include "mini_engine.h"
void AllInit()
{
mlog_init();
syssdl=new InitManager_SDL;
sysimg=new InitManager_IMG;
systtf=new InitManager_TTF;
sysmix=new InitManager_Mix;
}
void AllQuit()
{
delete sysmix;
delete systtf;
delete sysimg;
delete syssdl;
}

View File

@ -12,3 +12,6 @@
/******************************************************************************/ /******************************************************************************/
/// Application /// Application
#include "App.h" #include "App.h"
void AllInit();
void AllQuit();