Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ bool initSDL(void)
debug("Initializing SDL_mixer");
mixer_init();

char title_buffer[100];
m_sprintf(title_buffer, 100, "%s %d.%d.%d %s", GAME_TITLE, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, RELEASE_TYPE);
gWindow = SDL_CreateWindow(title_buffer,
char buffer[100] = { '\0' };
m_sprintf(buffer, 100, "%s %d.%d.%d %s", GAME_TITLE, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, RELEASE_TYPE);
gWindow = SDL_CreateWindow(buffer,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
if (gWindow == NULL)
Expand Down Expand Up @@ -176,6 +176,10 @@ bool initSDL(void)
SDL_StopTextInput(gWindow);
}

memset(buffer, '\0', 100);
sprintf(buffer, "%d.%d.%d", MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION);
SDL_SetAppMetadata(GAME_TITLE, buffer, "com.oliveshark.breakhack");

return true;
}

Expand Down Expand Up @@ -1401,7 +1405,7 @@ int main(int argc, char *argv[])
}

if (!init())
return 1;
return -1;

if (settings_get()->fullscreen_enabled) {
// Game starts in windowed mode so this will
Expand Down
Loading