[retro-gtk/wip/aplazas/c-port] Fixes
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/wip/aplazas/c-port] Fixes
- Date: Tue, 10 Oct 2017 07:27:58 +0000 (UTC)
commit cfd2ccb32b7fe7729dfd7a20626d2ccc830286d7
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Oct 10 09:27:43 2017 +0200
Fixes
retro-gtk/retro-core-descriptor.c | 19 +++++++++++++++++++
retro-gtk/retro-core-descriptor.h | 2 ++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/retro-gtk/retro-core-descriptor.c b/retro-gtk/retro-core-descriptor.c
index df725e4..0fcae0d 100644
--- a/retro-gtk/retro-core-descriptor.c
+++ b/retro-gtk/retro-core-descriptor.c
@@ -517,6 +517,25 @@ retro_core_descriptor_get_is_emulator (RetroCoreDescriptor *self,
}
/**
+ * retro_core_descriptor_get_name
+ * @self: a #RetroCoreDescriptor
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets the name, or %NULL if it doesn't exist.
+ *
+ * Returns: (nullable) (transfer full): a string or %NULL, free it with g_free()
+ */
+gchar *
+retro_core_descriptor_get_name (RetroCoreDescriptor *self,
+ GError **error)
+{
+ return g_key_file_get_string (self->key_file,
+ RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+ RETRO_CORE_DESCRIPTOR_NAME_KEY,
+ error);
+}
+
+/**
* retro_core_descriptor_get_icon
* @self: a #RetroCoreDescriptor
* @error: return location for a #GError, or %NULL
diff --git a/retro-gtk/retro-core-descriptor.h b/retro-gtk/retro-core-descriptor.h
index 09715fc..ae1663d 100644
--- a/retro-gtk/retro-core-descriptor.h
+++ b/retro-gtk/retro-core-descriptor.h
@@ -26,6 +26,8 @@ gboolean retro_core_descriptor_get_is_game (RetroCoreDescriptor *self,
GError **error);
gboolean retro_core_descriptor_get_is_emulator (RetroCoreDescriptor *self,
GError **error);
+char *retro_core_descriptor_get_name (RetroCoreDescriptor *self,
+ GError **error);
GIcon *retro_core_descriptor_get_icon (RetroCoreDescriptor *self,
GError **error);
char *retro_core_descriptor_get_module (RetroCoreDescriptor *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]