comparison dmres.c @ 733:b505b81a43de

Fix resource loading.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 21 Apr 2013 20:03:08 +0300
parents 2f02d9b4caa3
children 56c1d288f0e2
comparison
equal deleted inserted replaced
732:2f02d9b4caa3 733:b505b81a43de
608 /* FS file handling functions. These functions call the actual 608 /* FS file handling functions. These functions call the actual
609 * functions depending on where the file is located. 609 * functions depending on where the file is located.
610 */ 610 */
611 static int dmResourcePreload(DMResource *handle) 611 static int dmResourcePreload(DMResource *handle)
612 { 612 {
613 int ret = DMERR_INIT_FAIL; 613 int ret = DMERR_OK;
614 614
615 // Check if we want to preload raw data? 615 // Check if we want to preload raw data?
616 if (handle->lib->flags & DRF_PRELOAD_RAW) 616 if (handle->lib->flags & DRF_PRELOAD_RAW)
617 { 617 {
618 if (handle->flags & DMF_LOADED_RAW) 618 if (handle->flags & DMF_LOADED_RAW)
622 { 622 {
623 ret = handle->fops->preload(handle); 623 ret = handle->fops->preload(handle);
624 if (ret == DMERR_OK) 624 if (ret == DMERR_OK)
625 handle->flags |= DMF_LOADED_RAW | DMF_PERSIST; 625 handle->flags |= DMF_LOADED_RAW | DMF_PERSIST;
626 } 626 }
627 else
628 ret = DMERR_INIT_FAIL;
627 629
628 dmfreset(handle); 630 dmfreset(handle);
629 } 631 }
630 632
631 // Check if resource data is to be preloaded 633 // Check if resource data is to be preloaded