diff --git a/include/ege.h b/include/ege.h index b4d1e1a..0879fb2 100644 --- a/include/ege.h +++ b/include/ege.h @@ -815,7 +815,16 @@ bool EGEAPI getunicodecharmessage(); void EGEAPI setinitmode(int mode, int x = CW_USEDEFAULT, int y = CW_USEDEFAULT); int EGEAPI getinitmode(); void EGEAPI initgraph(int width, int height, int mode); -void EGEAPI initgraph(int width, int height); + +inline void EGEAPI initgraph(int width, int height) +{ +#if !defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) + initgraph(width, height, getinitmode()); +#else + initgraph(width, height, getinitmode() | INIT_WITHLOGO); +#endif +} + void EGEAPI initgraph(int* gdriver, int* gmode, const char* path); void EGEAPI closegraph(); bool EGEAPI is_run(); diff --git a/src/graphics.cpp b/src/graphics.cpp index 11edfec..8a667e9 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -874,15 +874,6 @@ void initgraph(int width, int height, int mode) initgraph(&g, &m, ""); } -void EGEAPI initgraph(int width, int height) -{ - #if !defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) - initgraph(width, height, getinitmode()); - #else - initgraph(width, height, getinitmode() | INIT_WITHLOGO); - #endif -} - void detectgraph(int* gdriver, int* gmode) { *gdriver = VGA;