Loader : Merge LaunchEmulation() into CxbxKrnlMain()
This commit is contained in:
parent
37f5a751a1
commit
890a5ffd2f
|
@ -907,7 +907,7 @@ bool HandleFirstLaunch()
|
||||||
return true;
|
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
|
// NOTE: This is designated for standalone kernel mode launch without GUI
|
||||||
if (g_Settings != nullptr) {
|
if (g_Settings != nullptr) {
|
||||||
|
@ -933,11 +933,6 @@ void LaunchEmulation(int argc, char* argv[])
|
||||||
/* Initialize Cxbx File Paths */
|
/* Initialize Cxbx File Paths */
|
||||||
CxbxInitFilePaths();
|
CxbxInitFilePaths();
|
||||||
|
|
||||||
CxbxKrnlMain(argc, argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CxbxKrnlMain(int argc, char* argv[])
|
|
||||||
{
|
|
||||||
// Skip '/load' switch
|
// Skip '/load' switch
|
||||||
// Get XBE Name :
|
// Get XBE Name :
|
||||||
std::string xbePath = std::filesystem::absolute(std::filesystem::path(argv[2])).string();
|
std::string xbePath = std::filesystem::absolute(std::filesystem::path(argv[2])).string();
|
||||||
|
|
|
@ -227,7 +227,7 @@ extern bool g_bIsDebugKernel;
|
||||||
bool HandleFirstLaunch();
|
bool HandleFirstLaunch();
|
||||||
|
|
||||||
/*! Cxbx Kernel Entry Point */
|
/*! Cxbx Kernel Entry Point */
|
||||||
void LaunchEmulation(int argc, char* argv[]);
|
void CxbxKrnlMain(int argc, char* argv[]);
|
||||||
|
|
||||||
/*! initialize emulation */
|
/*! 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);
|
__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);
|
||||||
|
|
|
@ -156,7 +156,7 @@ DWORD WINAPI Emulate(int system)
|
||||||
int argc;
|
int argc;
|
||||||
PCHAR *argv = CommandLineToArgvA(CommandLine, &argc);
|
PCHAR *argv = CommandLineToArgvA(CommandLine, &argc);
|
||||||
|
|
||||||
LaunchEmulation(argc, argv);
|
CxbxKrnlMain(argc, argv);
|
||||||
|
|
||||||
LocalFree(argv);
|
LocalFree(argv);
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bHasLoadArgument) {
|
if (bHasLoadArgument) {
|
||||||
LaunchEmulation(__argc, __argv);
|
CxbxKrnlMain(__argc, __argv);
|
||||||
EmuShared::Cleanup();
|
EmuShared::Cleanup();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue