This commit is contained in:
parent
c2dbcf3931
commit
7cae0ed7fc
2 changed files with 19 additions and 0 deletions
|
@ -408,6 +408,22 @@ JNIEXPORT jint JNICALL Java_org_emulator_forty_eight_NativeLib_onFileOpen(JNIEnv
|
||||||
_tcscpy(szBufferFilename, stateFilenameUTF8);
|
_tcscpy(szBufferFilename, stateFilenameUTF8);
|
||||||
|
|
||||||
chooseCurrentKmlMode = ChooseKmlMode_FILE_OPEN;
|
chooseCurrentKmlMode = ChooseKmlMode_FILE_OPEN;
|
||||||
|
//TODO
|
||||||
|
// TCHAR * fileScheme = _T("raw:");
|
||||||
|
// TCHAR * urlContentSchemeFound = _tcsstr(szChosenCurrentKml, fileScheme);
|
||||||
|
// if(urlContentSchemeFound) {
|
||||||
|
// _tcscpy(szChosenCurrentKml, szChosenCurrentKml + 4 * sizeof(TCHAR));
|
||||||
|
// _tcscpy(szEmuDirectory, szChosenCurrentKml);
|
||||||
|
// TCHAR * filename = _tcsrchr(szEmuDirectory, _T('/'));
|
||||||
|
// if(filename) {
|
||||||
|
// *filename = _T('\0');
|
||||||
|
// }
|
||||||
|
// _tcscpy(szRomDirectory, szEmuDirectory);
|
||||||
|
// } else {
|
||||||
|
// _tcscpy(szEmuDirectory, "assets/calculators/");
|
||||||
|
// _tcscpy(szRomDirectory, "assets/calculators/");
|
||||||
|
// }
|
||||||
|
|
||||||
BOOL result = OpenDocument(szBufferFilename);
|
BOOL result = OpenDocument(szBufferFilename);
|
||||||
if (result)
|
if (result)
|
||||||
MruAdd(szBufferFilename);
|
MruAdd(szBufferFilename);
|
||||||
|
|
|
@ -220,6 +220,9 @@ HANDLE CreateFileMapping(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttrib
|
||||||
handle->handleType = HANDLE_TYPE_FILE_MAPPING_ASSET;
|
handle->handleType = HANDLE_TYPE_FILE_MAPPING_ASSET;
|
||||||
handle->fileAsset = hFile->fileAsset;
|
handle->fileAsset = hFile->fileAsset;
|
||||||
}
|
}
|
||||||
|
if(dwMaximumSizeHigh == 0 && dwMaximumSizeLow == 0) {
|
||||||
|
dwMaximumSizeLow = GetFileSize(hFile, &dwMaximumSizeHigh);
|
||||||
|
}
|
||||||
handle->fileMappingSize = (dwMaximumSizeHigh << 32) | dwMaximumSizeLow;
|
handle->fileMappingSize = (dwMaximumSizeHigh << 32) | dwMaximumSizeLow;
|
||||||
handle->fileMappingAddress = NULL;
|
handle->fileMappingAddress = NULL;
|
||||||
return handle;
|
return handle;
|
||||||
|
|
Loading…
Reference in a new issue