Skip to content

Commit 86fb3cc

Browse files
hotfix
1 parent 273234e commit 86fb3cc

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

engine/include/tsengine/core.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ int run(Engine* const engine);
2424
} // namespace ver
2525
} // namespace ts
2626

27-
#define TS_MAIN() \
28-
int main() \
29-
{ \
30-
try \
31-
{ \
32-
auto result = ts::run(new Game); \
33-
if (result != ts::TS_SUCCESS) \
34-
{ \
35-
return result; \
36-
} \
37-
} \
38-
catch (const std::exception& e) \
39-
{ \
40-
std::cerr << e.what() << "\n"; \
41-
return EXIT_FAILURE; \
42-
} \
43-
\
44-
return EXIT_SUCCESS; \
27+
#define TS_MAIN(gameClass) \
28+
int main() \
29+
{ \
30+
try \
31+
{ \
32+
auto result = ts::run(new gameClass); \
33+
if (result != ts::TS_SUCCESS) \
34+
{ \
35+
return result; \
36+
} \
37+
} \
38+
catch (const std::exception& e) \
39+
{ \
40+
std::cerr << e.what() << "\n"; \
41+
return EXIT_FAILURE; \
42+
} \
43+
\
44+
return EXIT_SUCCESS; \
4545
}

game/game.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ void Game::close()
7979
TS_LOG("Thanks for playing!");
8080
}
8181

82-
TS_MAIN()
82+
TS_MAIN(Game)

0 commit comments

Comments
 (0)