void EmuScreen::bootGame(const std::string &filename) { if (PSP_IsIniting()) { std::string error_string; booted_ = PSP_InitUpdate(&error_string); if (booted_) { invalid_ = !PSP_IsInited(); if (invalid_) { errorMessage_ = error_string; ERROR_LOG(BOOT, "%s", errorMessage_.c_str()); System_SendMessage("event", "failstartgame"); return; } bootComplete(); } return; } invalid_ = true; CoreParameter coreParam; coreParam.cpuCore = g_Config.bJit ? CPU_JIT : CPU_INTERPRETER; coreParam.gpuCore = g_Config.bSoftwareRendering ? GPU_SOFTWARE : GPU_GLES; coreParam.enableSound = g_Config.bEnableSound; coreParam.fileToStart = filename; coreParam.mountIso = ""; coreParam.startPaused = false; coreParam.printfEmuLog = false; coreParam.headLess = false; if (g_Config.iInternalResolution == 0) { coreParam.renderWidth = dp_xres; coreParam.renderHeight = dp_yres; } else { if (g_Config.iInternalResolution < 0) g_Config.iInternalResolution = 1; coreParam.renderWidth = 480 * g_Config.iInternalResolution; coreParam.renderHeight = 272 * g_Config.iInternalResolution; } coreParam.outputWidth = dp_xres; coreParam.outputHeight = dp_yres; coreParam.pixelWidth = pixel_xres; coreParam.pixelHeight = pixel_yres; std::string error_string; if (!PSP_InitStart(coreParam, &error_string)) { booted_ = true; invalid_ = true; errorMessage_ = error_string; ERROR_LOG(BOOT, "%s", errorMessage_.c_str()); System_SendMessage("event", "failstartgame"); return; } }
void EmuScreen::checkPowerDown() { if (coreState == CORE_POWERDOWN && !PSP_IsIniting()) { if (PSP_IsInited()) { PSP_Shutdown(); } ILOG("SELF-POWERDOWN!"); screenManager()->switchScreen(new MainScreen()); bootPending_ = false; invalid_ = true; } }
void EmuScreen::bootGame(const std::string &filename) { if (PSP_IsIniting()) { std::string error_string; bootPending_ = !PSP_InitUpdate(&error_string); if (!bootPending_) { invalid_ = !PSP_IsInited(); if (invalid_) { errorMessage_ = error_string; ERROR_LOG(BOOT, "%s", errorMessage_.c_str()); System_SendMessage("event", "failstartgame"); return; } bootComplete(); } return; } invalid_ = true; CoreParameter coreParam; coreParam.cpuCore = g_Config.bJit ? CPU_JIT : CPU_INTERPRETER; coreParam.gpuCore = g_Config.bSoftwareRendering ? GPU_SOFTWARE : GPU_GLES; if (g_Config.iGPUBackend == GPU_BACKEND_DIRECT3D9) { coreParam.gpuCore = GPU_DIRECTX9; } coreParam.enableSound = g_Config.bEnableSound; coreParam.fileToStart = filename; coreParam.mountIso = ""; coreParam.mountRoot = ""; coreParam.startPaused = false; coreParam.printfEmuLog = false; coreParam.headLess = false; const Bounds &bounds = screenManager()->getUIContext()->GetBounds(); if (g_Config.iInternalResolution == 0) { coreParam.renderWidth = bounds.w; coreParam.renderHeight = bounds.h; } else { if (g_Config.iInternalResolution < 0) g_Config.iInternalResolution = 1; coreParam.renderWidth = 480 * g_Config.iInternalResolution; coreParam.renderHeight = 272 * g_Config.iInternalResolution; } std::string error_string; if (!PSP_InitStart(coreParam, &error_string)) { bootPending_ = false; invalid_ = true; errorMessage_ = error_string; ERROR_LOG(BOOT, "%s", errorMessage_.c_str()); System_SendMessage("event", "failstartgame"); } }