refactor(text_rendering): 移除调试日志并使用日志宏替代

替换直接使用std::cout和std::cerr输出调试信息为E2D_LOG_INFO宏
移除未使用的argc和argv参数
This commit is contained in:
ChestnutYueyue 2026-02-18 17:23:17 +08:00
parent 8e06bb0adb
commit 6008331fc5
1 changed files with 3 additions and 18 deletions

View File

@ -113,10 +113,6 @@ private:
};
int main(int argc, char *argv[]) {
(void)argc;
(void)argv;
std::cout << "Extra2D Text Rendering Demo - Starting..." << std::endl;
Application &app = Application::get();
@ -133,18 +129,14 @@ int main(int argc, char *argv[]) {
app.use<InputModule>([](auto &cfg) { cfg.priority = 20; });
std::cout << "Initializing application..." << std::endl;
if (!app.init()) {
std::cerr << "Failed to initialize application!" << std::endl;
E2D_LOG_INFO("Failed to initialize application!");
return -1;
}
std::cout << "Application initialized successfully!" << std::endl;
auto *win = app.window();
auto win = app.window();
if (win) {
std::cout << "Window: " << win->width() << "x" << win->height()
<< std::endl;
E2D_LOG_INFO("Window :{} x {}", win->width(), win->height());
}
// 设置事件监听
@ -186,15 +178,8 @@ int main(int argc, char *argv[]) {
app.enterScene(scene);
std::cout << "\nControls:" << std::endl;
std::cout << " ESC - Exit" << std::endl;
std::cout << "\nRunning main loop...\n" << std::endl;
app.run();
std::cout << "Shutting down..." << std::endl;
app.shutdown();
std::cout << "Goodbye!" << std::endl;
return 0;
}