From efdfeeec908357db63de431bacb264ccada5d507 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 9 Aug 2014 15:51:39 +0300 Subject: [PATCH] Distinguish SDL and Cocoa back-ends in startup log --- src/cocoa/i_backend_cocoa.mm | 9 +++++++++ src/sdl/i_gui.cpp | 5 +++++ src/sdl/i_main.cpp | 6 ++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/cocoa/i_backend_cocoa.mm b/src/cocoa/i_backend_cocoa.mm index 675fde182..d7e46dfe0 100644 --- a/src/cocoa/i_backend_cocoa.mm +++ b/src/cocoa/i_backend_cocoa.mm @@ -1310,6 +1310,15 @@ bool I_SetCursor(FTexture* cursorpic) // --------------------------------------------------------------------------- +const char* I_GetBackEndName() +{ + return "Native Cocoa"; +} + + +// --------------------------------------------------------------------------- + + extern "C" { diff --git a/src/sdl/i_gui.cpp b/src/sdl/i_gui.cpp index 2ecdcdb74..37fc750cb 100644 --- a/src/sdl/i_gui.cpp +++ b/src/sdl/i_gui.cpp @@ -76,3 +76,8 @@ void I_SetMainWindowVisible(bool visible) { } + +const char* I_GetBackEndName() +{ + return "SDL"; +} diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 3e199a165..7a18fb05f 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -239,6 +239,8 @@ static void unprotect_rtext() void I_StartupJoysticks(); void I_ShutdownJoysticks(); +const char* I_GetBackEndName(); + int main (int argc, char **argv) { #if !defined (__APPLE__) @@ -248,8 +250,8 @@ int main (int argc, char **argv) } #endif // !__APPLE__ - printf(GAMENAME" %s - %s - SDL version\nCompiled on %s\n", - GetVersionString(), GetGitTime(), __DATE__); + printf(GAMENAME" %s - %s - %s version\nCompiled on %s\n", + GetVersionString(), GetGitTime(), I_GetBackEndName(), __DATE__); seteuid (getuid ()); std::set_new_handler (NewFailure);