Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions workspace/all/minarch/minarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -3546,6 +3546,19 @@ static bool environment_callback(unsigned cmd, void *data) { // copied from pico
*out = core.saves_dir; // save_dir;
break;
}
case RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO: { /* 32 */
const struct retro_system_av_info *av = (const struct retro_system_av_info *)data;
if (av) {
double a = av->geometry.aspect_ratio;
if (a <= 0) a = (double)av->geometry.base_width / av->geometry.base_height;

core.fps = av->timing.fps;
core.sample_rate = av->timing.sample_rate;
core.aspect_ratio = a;
renderer.dst_p = 0;
}
return true;
}
case RETRO_ENVIRONMENT_SET_CONTROLLER_INFO: { /* 35 */
// LOG_info("RETRO_ENVIRONMENT_SET_CONTROLLER_INFO\n");
const struct retro_controller_info *infos = (const struct retro_controller_info *)data;
Expand All @@ -3566,6 +3579,16 @@ static bool environment_callback(unsigned cmd, void *data) { // copied from pico
break;
}
// RETRO_ENVIRONMENT_SET_MEMORY_MAPS (36 | RETRO_ENVIRONMENT_EXPERIMENTAL)
case RETRO_ENVIRONMENT_SET_GEOMETRY: { /* 37 */
const struct retro_game_geometry *geom = (const struct retro_game_geometry *)data;
if (geom) {
double a = geom->aspect_ratio;
if (a <= 0) a = (double)geom->base_width / geom->base_height;
core.aspect_ratio = a;
renderer.dst_p = 0;
}
return true;
}
case RETRO_ENVIRONMENT_GET_LANGUAGE: { /* 39 */
// puts("RETRO_ENVIRONMENT_GET_LANGUAGE");
if (data) *(int *) data = RETRO_LANGUAGE_ENGLISH;
Expand Down Expand Up @@ -3688,15 +3711,19 @@ static bool environment_callback(unsigned cmd, void *data) { // copied from pico
if (data) {
OptionList_reset();
OptionList_v2_init((const struct retro_core_options_v2 *)data);
Config_readOptions();
}
break;
}
case RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL: { /* 68 */
// puts("RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL");
if (data) {
const struct retro_core_options_v2_intl *intl = (const struct retro_core_options_v2_intl *)data;
OptionList_reset();
OptionList_v2_init(intl->us);
if (intl && intl->us) {
OptionList_reset();
OptionList_v2_init(intl->us);
Config_readOptions();
}
}
break;
}
Expand Down