Skip to content

Commit 5429300

Browse files
committed
Fixed: ini file quoted paths, RPROG_OHM parameter error
1 parent cce5172 commit 5429300

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

bsp/bsp.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ if(PLATFORM STREQUAL "N1100")
1818
endif()
1919
if(NOT RPROG_OHM)
2020
MESSAGE(STATUS "No RPROG_OHM specified, using default: 2000")
21-
add_definitions(-DRPROG_OHM=2000)
21+
set (RPROG_OHM 2000)
2222
endif()
23+
add_definitions(-DRPROG_OHM=${RPROG_OHM})
2324
elseif(PLATFORM STREQUAL "F4DISCOVERY")
2425
add_definitions(-DF4DISCOVERY)
2526
set (USE_HOST_MODE 1)

src/player/player.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ void Player_Init(void)
9090

9191
Navigator_InitRoot(&PlayerContext, suffixes_white_list);
9292

93-
#ifndef PROFILING
9493
char buf[256];
9594

96-
//todo len???, null-terminated???
9795
int len;
9896
len = ini_gets("file", "path", "", buf, sizeof(buf), PLAYER_INI_FILE);
9997
if (len)
@@ -140,7 +138,6 @@ void Player_Init(void)
140138
}
141139
}
142140
else
143-
#endif
144141
{
145142
Navigator_NextFile(&PlayerContext);
146143

@@ -465,13 +462,13 @@ void Player_SaveState(void)
465462
{
466463
f_puts("[file]\n", &f);
467464

468-
f_printf(&f, "path=");
465+
f_printf(&f, "path=\"");
469466
f_puts(PlayerContext.dir_path, &f);
470-
f_printf(&f, "\n");
467+
f_printf(&f, "\"\n");
471468

472-
f_printf(&f, "name=");
469+
f_printf(&f, "name=\"");
473470
f_puts(PlayerContext.fname, &f);
474-
f_printf(&f, "\n");
471+
f_printf(&f, "\"\n");
475472

476473
f_printf(&f, "mstime=%u\n", PlayerState.metadata.mstime_curr);
477474
}

0 commit comments

Comments
 (0)