-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
47 lines (39 loc) · 1.08 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "application.h"
/*
* 换了电脑编译说有语法错误:
* 目前知道的是:中文输出的问题。
* 解决方法:在中文结尾后加一个 “空格” 或 字母 。
*/
/*
/l、
(゚、 。7
l、 ~ヽ
じしf_, )ノ
*/
int main() {
/*std::cout << "结果:" << translate("Variable", "auto", "ja");
return 0;*/
//防止软件多开
if (FindWindow(NULL, "TranslatorKyi"))
{
MessageBoxEx(NULL, TEXT("Software Started"), TEXT("Error"), MB_OK, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
return FALSE;
}
Variable::ReadFile(iniData);
Language::ReadFile(Variable::Language);
TOOL::SpdLogInit();
GAME::Application* app = new GAME::Application();
VulKan::Window* mWin = new VulKan::Window(app->mWidth, app->mHeight, 0, 0);
mWin->setApp(app);
try {
app->run(mWin);
}
catch (const std::exception& e) {
MessageBoxEx(NULL, TEXT(e.what()), TEXT("main"), MB_OK, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
TOOL::logger->error(e.what());
//std::cout << "main: " << e.what() << std::endl;
}
delete mWin;
delete app;
return 0;
}