The Update(TM), Part 1
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
#include "window.h"
|
||||
|
||||
/* Sets the window title from the given anm2 */
|
||||
void
|
||||
window_title_from_path_set(SDL_Window* self, const std::string& path)
|
||||
void window_title_from_path_set(SDL_Window* self, const std::string& path)
|
||||
{
|
||||
if (path.empty())
|
||||
{
|
||||
std::string windowTitle = path;
|
||||
windowTitle = windowTitle + " (" + path + ")";
|
||||
SDL_SetWindowTitle(self, windowTitle.c_str());
|
||||
}
|
||||
if (!path.empty())
|
||||
SDL_SetWindowTitle(self, std::format(WINDOW_TITLE_FORMAT, path).c_str());
|
||||
else
|
||||
SDL_SetWindowTitle(self, STRING_WINDOW_TITLE);
|
||||
SDL_SetWindowTitle(self, WINDOW_TITLE);
|
||||
}
|
Reference in New Issue
Block a user