Skip to content

Commit

Permalink
Libretro: Set Interpreter as default CPU and get CPU from setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard committed Dec 6, 2022
1 parent 5da13c3 commit 10eafe2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,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));
Expand All @@ -1398,9 +1401,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))
{
Expand Down

0 comments on commit 10eafe2

Please sign in to comment.