[retro-gtk/c-port: 28/37] Merge CbError into CoreError



commit 3a0de56aee947a4d0ff328e4cdbe5d30f240ce99
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Sep 25 13:28:53 2017 +0200

    Merge CbError into CoreError

 retro-gtk/retro-core.c |   21 +++++++++++----------
 retro-gtk/retro.vala   |    9 ---------
 2 files changed, 11 insertions(+), 19 deletions(-)
---
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 409f208..6173fca 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -19,6 +19,7 @@ enum {
   RETRO_CORE_ERROR_COULDNT_SERIALIZE,
   RETRO_CORE_ERROR_COULDNT_DESERIALIZE,
   RETRO_CORE_ERROR_SERIALIZATION_NOT_SUPPORTED,
+  RETRO_CORE_ERROR_NO_CALLBACK,
 };
 
 /* Private */
@@ -282,8 +283,8 @@ retro_core_set_disk_ejected (RetroCore  *self,
 
   if (set_eject_state == NULL) {
     g_set_error_literal (error,
-                         RETRO_CB_ERROR,
-                         RETRO_CB_ERROR_NO_CALLBACK,
+                         RETRO_CORE_ERROR,
+                         RETRO_CORE_ERROR_NO_CALLBACK,
                          "DiskControl has no callback for this operation.");
 
     return FALSE;
@@ -313,8 +314,8 @@ retro_core_set_disk_image_index (RetroCore  *self,
 
   if (set_image_index == NULL) {
     g_set_error_literal (error,
-                         RETRO_CB_ERROR,
-                         RETRO_CB_ERROR_NO_CALLBACK,
+                         RETRO_CORE_ERROR,
+                         RETRO_CORE_ERROR_NO_CALLBACK,
                          "DiskControl has no callback for this operation.");
 
     return FALSE;
@@ -343,8 +344,8 @@ retro_core_get_disk_images_number (RetroCore  *self,
 
   if (get_num_images == NULL) {
     g_set_error_literal (error,
-                         RETRO_CB_ERROR,
-                         RETRO_CB_ERROR_NO_CALLBACK,
+                         RETRO_CORE_ERROR,
+                         RETRO_CORE_ERROR_NO_CALLBACK,
                          "DiskControl has no callback for this operation.");
 
     return FALSE;
@@ -375,8 +376,8 @@ retro_core_replace_disk_image_index (RetroCore     *self,
 
   if (replace_image_index == NULL) {
     g_set_error_literal (error,
-                         RETRO_CB_ERROR,
-                         RETRO_CB_ERROR_NO_CALLBACK,
+                         RETRO_CORE_ERROR,
+                         RETRO_CORE_ERROR_NO_CALLBACK,
                          "DiskControl has no callback for this operation.");
 
     return FALSE;
@@ -405,8 +406,8 @@ retro_core_add_disk_image_index (RetroCore  *self,
 
   if (add_image_index == NULL) {
     g_set_error_literal (error,
-                         RETRO_CB_ERROR,
-                         RETRO_CB_ERROR_NO_CALLBACK,
+                         RETRO_CORE_ERROR,
+                         RETRO_CORE_ERROR_NO_CALLBACK,
                          "DiskControl has no callback for this operation.");
 
     return FALSE;
diff --git a/retro-gtk/retro.vala b/retro-gtk/retro.vala
index 2d77e8e..559b41e 100644
--- a/retro-gtk/retro.vala
+++ b/retro-gtk/retro.vala
@@ -10,14 +10,5 @@ public const uint API_VERSION = 1;
 
 private const string ENV_PLUGIN_PATH = "RETRO_PLUGIN_PATH_1_0";
 
-/**
- * Error type thrown by interfaces when accessing one of their Core's
- * callback.
- */
-private errordomain CbError {
-       NO_CORE,
-       NO_CALLBACK
-}
-
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]