mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Add branch name to window title in brackets
The branch name will be added to the window title if it is an interim version, e.g. "VVVVVV [master]". This makes it easier for developers to tell at a glance which build of the game they're running.
This commit is contained in:
parent
19a83853b8
commit
172e3a8985
1 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "FileSystemUtils.h"
|
||||
#include "Game.h"
|
||||
#include "GraphicsUtil.h"
|
||||
#include "InterimVersion.h"
|
||||
#include "Vlogging.h"
|
||||
|
||||
void ScreenSettings_default(struct ScreenSettings* _this)
|
||||
|
@ -52,7 +53,16 @@ void Screen::init(const struct ScreenSettings* settings)
|
|||
&m_window,
|
||||
&m_renderer
|
||||
);
|
||||
#ifdef INTERIM_VERSION_EXISTS
|
||||
/* Branch name limits are ill-defined but on GitHub it's ~256 chars
|
||||
* ( https://stackoverflow.com/a/24014513/ ).
|
||||
* Really though, just don't use super long branch names. */
|
||||
char title[256];
|
||||
SDL_snprintf(title, sizeof(title), "VVVVVV [%s]", BRANCH_NAME);
|
||||
SDL_SetWindowTitle(m_window, title);
|
||||
#else
|
||||
SDL_SetWindowTitle(m_window, "VVVVVV");
|
||||
#endif
|
||||
|
||||
LoadIcon();
|
||||
|
||||
|
|
Loading…
Reference in a new issue