Top |
guint | api-version | Read |
gchar * | content-directory | Read / Write |
gchar * | filename | Read / Write / Construct Only |
gdouble | frames-per-second | Read |
gboolean | game-loaded | Read |
gboolean | is-initiated | Read |
guint | runahead | Read / Write |
gchar * | save-directory | Read / Write |
gdouble | speed-rate | Read / Write |
gboolean | support-no-game | Read |
gchar * | system-directory | Read / Write |
void | crashed | Run Last |
void | log | Run Last |
void | message | Run Last |
void | shutdown | Run Last |
void | video-output | Run Last |
guint
retro_core_get_api_version (RetroCore *self
);
Gets the Libretro API version implement by the core.
const gchar *
retro_core_get_filename (RetroCore *self
);
Gets the filename of the core.
const gchar *
retro_core_get_system_directory (RetroCore *self
);
Gets the system directory of the core.
The core will look here for additional data, such as firmware ROMs or configuration files.
void retro_core_set_system_directory (RetroCore *self
,const gchar *system_directory
);
Sets the system directory of the core.
The core will look here for additional data, such as firmware ROMs or configuration files.
const gchar *
retro_core_get_content_directory (RetroCore *self
);
void retro_core_set_content_directory (RetroCore *self
,const gchar *content_directory
);
const gchar *
retro_core_get_save_directory (RetroCore *self
);
Gets the save directory of the core.
The core will save some data here.
void retro_core_set_save_directory (RetroCore *self
,const gchar *save_directory
);
Sets the save directory of the core.
The core will save some data here.
gboolean
retro_core_get_is_initiated (RetroCore *self
);
Gets whether the core has been initiated.
gboolean
retro_core_get_game_loaded (RetroCore *self
);
Gets whether a game has been loaded.
gboolean
retro_core_get_support_no_game (RetroCore *self
);
Gets whether the core supports running with no game.
gdouble
retro_core_get_frames_per_second (RetroCore *self
);
Gets the FPS rate for the core's video output.
void retro_core_boot (RetroCore *self
,GError **error
);
This initializes self
, loads its available options and loads the medias. You
need to boot self
before using some of its methods.
void retro_core_set_medias (RetroCore *self
,const gchar * const *uris
);
Sets the medias to load into the core.
You can use this before booting the core.
void retro_core_set_current_media (RetroCore *self
,guint media_index
,GError **error
);
Sets the current media index.
You can use this after booting the core.
void
retro_core_run (RetroCore *self
);
Starts running the core. If the core was stopped, it will restart from this moment.
gboolean
retro_core_get_can_access_state (RetroCore *self
);
Gets whether the state of self
can be accessed.
void retro_core_save_state (RetroCore *self
,const gchar *filename
,GError **error
);
Saves the state of self
.
void retro_core_load_state (RetroCore *self
,const gchar *filename
,GError **error
);
Loads the state of the self
.
gsize retro_core_get_memory_size (RetroCore *self
,RetroMemoryType memory_type
);
Gets the size of a memory region of self
.
void retro_core_save_memory (RetroCore *self
,RetroMemoryType memory_type
,const gchar *filename
,GError **error
);
Saves a memory region of self
.
void retro_core_load_memory (RetroCore *self
,RetroMemoryType memory_type
,const gchar *filename
,GError **error
);
Loads a memory region of self
.
void retro_core_set_default_controller (RetroCore *self
,RetroControllerType controller_type
,RetroController *controller
);
Uses controller
as the default controller for the given type. When a port
has no controller plugged plugged into it, the core will use the default
controllers instead.
void retro_core_set_controller (RetroCore *self
,guint port
,RetroController *controller
);
Plugs controller
into the specified port number of self
.
void retro_core_set_keyboard (RetroCore *self
,GtkWidget *widget
);
Sets the widget whose key events will be forwarded to self
.
RetroControllerIterator *
retro_core_iterate_controllers (RetroCore *self
);
Creates a new RetroControllerIterator which can be used to iterate through
the controllers plugged into self
.
gdouble
retro_core_get_speed_rate (RetroCore *self
);
Gets the speed rate at which to run the core.
void retro_core_set_speed_rate (RetroCore *self
,gdouble speed_rate
);
Sets the speed rate at which to run the core.
gboolean retro_core_has_option (RetroCore *self
,const gchar *key
);
Gets whether the core has an option for the given key.
RetroOption * retro_core_get_option (RetroCore *self
,const gchar *key
);
Gets the option for the given key.
RetroOptionIterator *
retro_core_iterate_options (RetroCore *self
);
Creates a new RetroOptionIterator which can be used to iterate through the
options of self
.
void retro_core_override_option_default (RetroCore *self
,const gchar *key
,const gchar *value
);
Overrides default value for the option key
. This can be used to set value
for a startup-only option.
You can use this before booting the core.
“api-version”
property “api-version” guint
The Libretro API version implement by the core.
Flags: Read
Default value: 0
“content-directory”
property “content-directory” gchar *
The content directory.
Flags: Read / Write
Default value: NULL
“filename”
property “filename” gchar *
The filename of the core.
Flags: Read / Write / Construct Only
Default value: NULL
“frames-per-second”
property “frames-per-second” gdouble
The FPS rate for the core's video output.
Flags: Read
Default value: 0
“game-loaded”
property “game-loaded” gboolean
Whether a game has been loaded.
Flags: Read
Default value: FALSE
“is-initiated”
property “is-initiated” gboolean
Whether the core has been initiated.
Flags: Read
Default value: FALSE
“runahead”
property “runahead” guint
The number of frames to run ahead of time. This allows to know in advance what should happen in the given number of frames, allowing to react in advance.
Note that this is resource intensive as the core will be iterated over multiple times for each perceived iteration. In order to work, this requires the cores to properly support serialization, otherwise the behavior is undefined.
Flags: Read / Write
Default value: 0
“save-directory”
property “save-directory” gchar *
The save directory of the core.
The core will save some data here.
Flags: Read / Write
Default value: NULL
“speed-rate”
property “speed-rate” gdouble
The speed ratio at wich the core will run.
Flags: Read / Write
Allowed values: >= 0
Default value: 1
“support-no-game”
property “support-no-game” gboolean
Whether the core supports running with no game.
Flags: Read
Default value: FALSE
“crashed”
signalvoid user_function (RetroCore *self, gchar *message, gpointer user_data)
The ::crash signal is emitted when the core crashes.
self |
the RetroCore |
|
message |
the message to show to the user |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“log”
signalvoid user_function (RetroCore *self, gchar *log_domain, guint log_level, gchar *message, gpointer user_data)
The ::log signal is emitted each time the core emits a message to log.
self |
the RetroCore |
|
log_domain |
the log domain |
|
log_level |
the log level. |
[type GLogLevelFlags] |
message |
the message |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“message”
signalvoid user_function (RetroCore *self, gchar *message, guint frames, gpointer user_data)
The ::message signal is emitted each time the core emits a message to display during a given amount of frames.
self |
the RetroCore |
|
message |
the message |
|
frames |
the number of frames the message should be displayed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“shutdown”
signalvoid user_function (RetroCore *self, gpointer user_data)
The ::shutdown signal is emitted when the core shut down.
The core must be released or re-started in order to function anew.
Flags: Run Last
“video-output”
signalvoid user_function (RetroCore *self, gpointer pixdata, gpointer user_data)
The ::video-output signal is emitted each time a new video frame is emitted by the core.
pixdata
will be invalid after the signal emission, copy it in some way if
you want to keep it.
self |
the RetroCore |
|
pixdata |
the RetroPixdata. |
[type RetroPixdata] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last