forked from bartvdbraak/blender
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:
parent
375ede0f3f
commit
d68a84d1d2
@ -389,7 +389,7 @@ bool BKE_undo_save_file(const char *filename)
|
|||||||
Main *BKE_undo_get_main(Scene **r_scene)
|
Main *BKE_undo_get_main(Scene **r_scene)
|
||||||
{
|
{
|
||||||
Main *mainp = NULL;
|
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) {
|
if (bfd) {
|
||||||
mainp = bfd->main;
|
mainp = bfd->main;
|
||||||
|
@ -430,7 +430,7 @@ int BKE_blendfile_read_userdef(const char *filepath, ReportList *reports)
|
|||||||
BlendFileData *bfd;
|
BlendFileData *bfd;
|
||||||
int retval = BKE_BLENDFILE_READ_FAIL;
|
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) {
|
||||||
if (bfd->user) {
|
if (bfd->user) {
|
||||||
retval = BKE_BLENDFILE_READ_OK_USERPREFS;
|
retval = BKE_BLENDFILE_READ_OK_USERPREFS;
|
||||||
|
@ -74,6 +74,7 @@ typedef struct BlendFileData {
|
|||||||
|
|
||||||
/* skip reading some data-block types (may want to skip screen data too). */
|
/* skip reading some data-block types (may want to skip screen data too). */
|
||||||
typedef enum eBLOReadSkip {
|
typedef enum eBLOReadSkip {
|
||||||
|
BLO_READ_SKIP_NONE = 0,
|
||||||
BLO_READ_SKIP_USERDEF = (1 << 0),
|
BLO_READ_SKIP_USERDEF = (1 << 0),
|
||||||
} eBLOReadSkip;
|
} eBLOReadSkip;
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static Main *load_main_from_memory(const void *blend, int blend_size)
|
|||||||
BlendFileData *bfd;
|
BlendFileData *bfd;
|
||||||
|
|
||||||
G.fileflags |= G_FILE_NO_UI;
|
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) {
|
if (bfd) {
|
||||||
bmain = bfd->main;
|
bmain = bfd->main;
|
||||||
|
|
||||||
|
@ -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));
|
BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bfd= BLO_read_from_file(progname, &reports);
|
bfd= BLO_read_from_file(progname, &reports, BLO_READ_SKIP_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bfd && filename) {
|
if (!bfd && filename) {
|
||||||
|
Loading…
Reference in New Issue
Block a user