Merge pull request #16513 from rf2222222/libretro_cpu_setting

Libretro: Set Interpreter as default CPU and get CPU from setting
This commit is contained in:
Henrik Rydgård 2022-12-09 11:52:49 +01:00 committed by GitHub
commit d04771252d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1413,6 +1413,9 @@ bool retro_load_game(const struct retro_game_info *game)
useEmuThread = ctx->GetGPUCore() == GPUCORE_GLES;
// default to interpreter to allow startup in platforms w/o JIT capability
g_Config.iCpuCore = (int)CPUCore::INTERPRETER;
CoreParameter coreParam = {};
coreParam.enableSound = true;
coreParam.fileToStart = Path(std::string(game->path));
@ -1422,9 +1425,11 @@ bool retro_load_game(const struct retro_game_info *game)
coreParam.headLess = true;
coreParam.graphicsContext = ctx;
coreParam.gpuCore = ctx->GetGPUCore();
coreParam.cpuCore = (CPUCore)g_Config.iCpuCore;
check_variables(coreParam);
// set cpuCore from libretro setting variable
coreParam.cpuCore = (CPUCore)g_Config.iCpuCore;
std::string error_string;
if (!PSP_InitStart(coreParam, &error_string))
{