committed by
Norman Feske
parent
89a77be73d
commit
627fba1055
@@ -97,6 +97,34 @@ bool environment_callback(unsigned cmd, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
case RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS:
|
||||
{
|
||||
try {
|
||||
global_frontend->input_reporter.enabled(true);
|
||||
} catch (...) {
|
||||
Genode::error("input descriptors not reported");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* TODO: translate device, index, and id to a string descriptor */
|
||||
|
||||
Genode::Reporter::Xml_generator gen(global_frontend->input_reporter, [&] () {
|
||||
for (const struct retro_input_descriptor *desc = (retro_input_descriptor*)data;
|
||||
(desc && (desc->description != NULL)); ++desc)
|
||||
{
|
||||
gen.node("descriptor", [&] () {
|
||||
gen.attribute("port", desc->port);
|
||||
gen.attribute("device", desc->device);
|
||||
gen.attribute("index", desc->index);
|
||||
gen.attribute("id", desc->id);
|
||||
gen.attribute("description", desc->description);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
case RETRO_ENVIRONMENT_SHUTDOWN:
|
||||
global_frontend->env.parent().exit(0);
|
||||
return true;
|
||||
@@ -159,6 +187,10 @@ bool environment_callback(unsigned cmd, void *data)
|
||||
// global_frontend->core.supports_null_load = data;
|
||||
// return true;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_RUMBLE_INTERFACE:
|
||||
Genode::warning("Genode rumble interface not implemented");
|
||||
return false;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_LOG_INTERFACE:
|
||||
{
|
||||
retro_log_callback *cb = (retro_log_callback*)data;
|
||||
|
||||
@@ -309,6 +309,7 @@ struct Retro_frontend::Frontend
|
||||
|
||||
Timer::Connection timer { env };
|
||||
|
||||
Genode::Reporter input_reporter { env, "input" };
|
||||
Genode::Reporter variable_reporter { env, "variables" };
|
||||
Genode::Reporter subsystem_reporter { env, "subsystems" };
|
||||
Genode::Reporter controller_reporter { env, "controllers" };
|
||||
|
||||
Reference in New Issue
Block a user