Fixes to the new LaunchDataPage implementation

This commit is contained in:
Luke Usher 2017-03-10 23:49:56 +00:00
parent 03ba1af6ec
commit d89ddabd01
2 changed files with 11 additions and 11 deletions

View File

@ -454,6 +454,7 @@ XBSYSAPI EXPORTNUM(49) xboxkrnl::VOID DECLSPEC_NORETURN xboxkrnl::HalReturnToFir
CxbxKrnlCleanup("Could not launch %s", lpTitlePath); CxbxKrnlCleanup("Could not launch %s", lpTitlePath);
} }
} }
break;
}; };
case ReturnFirmwareHard: case ReturnFirmwareHard:

View File

@ -934,18 +934,17 @@ DWORD WINAPI XTL::EMUPATCH(XLaunchNewImage)
if (xboxkrnl::LaunchDataPage == NULL) if (xboxkrnl::LaunchDataPage == NULL)
xboxkrnl::LaunchDataPage = (xboxkrnl::LAUNCH_DATA_PAGE *)xboxkrnl::MmAllocateContiguousMemory(sizeof(xboxkrnl::LAUNCH_DATA_PAGE)); xboxkrnl::LaunchDataPage = (xboxkrnl::LAUNCH_DATA_PAGE *)xboxkrnl::MmAllocateContiguousMemory(sizeof(xboxkrnl::LAUNCH_DATA_PAGE));
if (lpTitlePath != NULL) Xbe::Certificate *pCertificate = (Xbe::Certificate*)CxbxKrnl_XbeHeader->dwCertificateAddr;
// Without a title, return to dashboard : xboxkrnl::LaunchDataPage->Header.dwTitleId = pCertificate->dwTitleId;
xboxkrnl::LaunchDataPage->Header.dwLaunchDataType = LDT_TITLE; xboxkrnl::LaunchDataPage->Header.dwFlags = 0; // TODO : What to put in here?
else xboxkrnl::LaunchDataPage->Header.dwLaunchDataType = LDT_TITLE;
{
Xbe::Certificate *pCertificate = (Xbe::Certificate*)CxbxKrnl_XbeHeader->dwCertificateAddr;
xboxkrnl::LaunchDataPage->Header.dwTitleId = pCertificate->dwTitleId;
xboxkrnl::LaunchDataPage->Header.dwFlags = 0; // TODO : What to put in here?
if (pLaunchData != NULL)
// Save the launch data
memcpy(&(xboxkrnl::LaunchDataPage->LaunchData[0]), pLaunchData, sizeof(LAUNCH_DATA));
if (pLaunchData != NULL)
// Save the launch data
memcpy(&(xboxkrnl::LaunchDataPage->LaunchData[0]), pLaunchData, sizeof(LAUNCH_DATA));
if (lpTitlePath == NULL)
{
// If no path is specified, then the xbe is rebooting to dashboard // If no path is specified, then the xbe is rebooting to dashboard
char szDashboardPath[MAX_PATH] = { 0 }; char szDashboardPath[MAX_PATH] = { 0 };
XboxDevice* rootDevice = CxbxDeviceByDevicePath(DeviceHarddisk0Partition2); XboxDevice* rootDevice = CxbxDeviceByDevicePath(DeviceHarddisk0Partition2);