Loader : Merge LaunchEmulation() into CxbxKrnlMain()

This commit is contained in:
patrickvl 2019-02-10 16:46:56 +01:00 committed by RadWolfie
parent 37f5a751a1
commit 890a5ffd2f
4 changed files with 4 additions and 9 deletions

View File

@ -907,7 +907,7 @@ bool HandleFirstLaunch()
return true;
}
void LaunchEmulation(int argc, char* argv[])
void CxbxKrnlMain(int argc, char* argv[])
{
// NOTE: This is designated for standalone kernel mode launch without GUI
if (g_Settings != nullptr) {
@ -933,11 +933,6 @@ void LaunchEmulation(int argc, char* argv[])
/* Initialize Cxbx File Paths */
CxbxInitFilePaths();
CxbxKrnlMain(argc, argv);
}
void CxbxKrnlMain(int argc, char* argv[])
{
// Skip '/load' switch
// Get XBE Name :
std::string xbePath = std::filesystem::absolute(std::filesystem::path(argv[2])).string();

View File

@ -227,7 +227,7 @@ extern bool g_bIsDebugKernel;
bool HandleFirstLaunch();
/*! Cxbx Kernel Entry Point */
void LaunchEmulation(int argc, char* argv[]);
void CxbxKrnlMain(int argc, char* argv[]);
/*! initialize emulation */
__declspec(noreturn) void CxbxKrnlInit(void *pTLSData, Xbe::TLS *pTLS, Xbe::LibraryVersion *LibraryVersion, DebugMode DbgMode, const char *szDebugFilename, Xbe::Header *XbeHeader, uint32_t XbeHeaderSize, void (*Entry)(), int BootFlags);

View File

@ -156,7 +156,7 @@ DWORD WINAPI Emulate(int system)
int argc;
PCHAR *argv = CommandLineToArgvA(CommandLine, &argc);
LaunchEmulation(argc, argv);
CxbxKrnlMain(argc, argv);
LocalFree(argv);

View File

@ -92,7 +92,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}
if (bHasLoadArgument) {
LaunchEmulation(__argc, __argv);
CxbxKrnlMain(__argc, __argv);
EmuShared::Cleanup();
return EXIT_SUCCESS;
}