Ticket #9112: scumm_mac_resfork.diff
File scumm_mac_resfork.diff, 1.3 KB (added by , 14 years ago) |
---|
-
resource_he.cpp
38 38 #include "common/stream.h" 39 39 #include "common/system.h" 40 40 41 #ifdef MACOSX 42 #include "common/config-manager.h" 43 #include "backends/fs/stdiostream.h" 44 #endif 45 41 46 namespace Scumm { 42 47 43 48 #define LE16(x) ((x) = TO_LE_16(x)) … … 1151 1156 Common::File in; 1152 1157 int size; 1153 1158 1159 #ifdef MACOSX 1160 if (_fileName.empty()) 1161 _fileName = _vm->generateFilename(-3) + "/..namedfork/rsrc"; 1162 1163 // HACK: Open the resource fork using the path and directly through StdioStream 1164 if (!in.open(StdioStream::makeFromPath(ConfMan.get("path") + "/" + _fileName, false), _fileName)) 1165 error("Could not open resource fork: %s", _fileName.c_str()); 1166 #else 1154 1167 if (_fileName.empty()) { // We are running for the first time 1155 1168 _fileName = _vm->generateFilename(-3); 1156 1169 … … 1172 1185 } 1173 1186 } else 1174 1187 in.open(_fileName); 1188 #endif 1175 1189 1176 1190 if (!in.isOpen()) { 1177 1191 error("Cannot open file %s", _fileName.c_str()); … … 1181 1195 if (_resOffset == -1) { 1182 1196 if (!init(in)) 1183 1197 error("Resource fork is missing in file '%s'", _fileName.c_str()); 1184 in.close();1185 in.open(_fileName);1186 1198 } 1187 1199 1188 1200 *buf = getResource(in, "crsr", 1000 + id, &size);