Fix BGE building.

When you use typedef'ed enum, you need to define all supported values
explicitely in enum, else compiler goes grumpy...
This commit is contained in:
Bastien Montagne 2017-03-16 10:30:02 +01:00
parent 375ede0f3f
commit d68a84d1d2
5 changed files with 5 additions and 4 deletions

View File

@ -389,7 +389,7 @@ bool BKE_undo_save_file(const char *filename)
Main *BKE_undo_get_main(Scene **r_scene)
{
Main *mainp = NULL;
BlendFileData *bfd = BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL, 0);
BlendFileData *bfd = BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL, BLO_READ_SKIP_NONE);
if (bfd) {
mainp = bfd->main;

View File

@ -430,7 +430,7 @@ int BKE_blendfile_read_userdef(const char *filepath, ReportList *reports)
BlendFileData *bfd;
int retval = BKE_BLENDFILE_READ_FAIL;
bfd = BLO_read_from_file(filepath, reports, 0);
bfd = BLO_read_from_file(filepath, reports, BLO_READ_SKIP_NONE);
if (bfd) {
if (bfd->user) {
retval = BKE_BLENDFILE_READ_OK_USERPREFS;

View File

@ -74,6 +74,7 @@ typedef struct BlendFileData {
/* skip reading some data-block types (may want to skip screen data too). */
typedef enum eBLOReadSkip {
BLO_READ_SKIP_NONE = 0,
BLO_READ_SKIP_USERDEF = (1 << 0),
} eBLOReadSkip;

View File

@ -196,7 +196,7 @@ static Main *load_main_from_memory(const void *blend, int blend_size)
BlendFileData *bfd;
G.fileflags |= G_FILE_NO_UI;
bfd = BLO_read_from_memory(blend, blend_size, NULL, 0);
bfd = BLO_read_from_memory(blend, blend_size, NULL, BLO_READ_SKIP_NONE);
if (bfd) {
bmain = bfd->main;

View File

@ -355,7 +355,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name));
}
} else {
bfd= BLO_read_from_file(progname, &reports);
bfd= BLO_read_from_file(progname, &reports, BLO_READ_SKIP_NONE);
}
if (!bfd && filename) {