Skip to content

Commit 7d04841

Browse files
committed
Fixed using on basic_sample generation #1
1 parent 673e869 commit 7d04841

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/raylib_project_creator.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,8 @@ static void SetupProject(ProjectConfig *config)
987987
// Get template directory
988988
// TODO: Use embedded template into executable?
989989
char templatePath[256] = { 0 };
990-
strcpy(templatePath, TextFormat("%s/template", GetApplicationDirectory()));
990+
//strcpy(templatePath, TextFormat("%s/template", GetApplicationDirectory()));
991+
strcpy(templatePath, "./template"); // NOTE: Template directory should be in same directory as application, usually working directory
991992

992993
// Remove spaces from directories/files names
993994
char outProjectName[256] = { 0 };
@@ -1127,7 +1128,7 @@ static void SetupProject(ProjectConfig *config)
11271128
if (config->project.type == 0) // Using basic template (one file)
11281129
{
11291130
fileTextUpdated[0] = TextReplace(fileText, "project_name.c", TextFormat("%s.c", TextToLower(config->project.name)));
1130-
fileTextUpdated[1] = TextReplace(fileTextUpdated[0], "", "");
1131+
fileTextUpdated[1] = TextReplace(fileTextUpdated[0], "project_name", "project_name"); // WARNING: Only used to force a second buffer usage!
11311132
}
11321133
else if (config->project.type == 1) // Using advance template (multiple files)
11331134
{

0 commit comments

Comments
 (0)