[retro-gtk] retro-controller: Remove poll()



commit cbd1b4d8e5f0365bc146ada0ec8b07cb7eeb8f96
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Jan 14 14:47:14 2020 +0500

    retro-controller: Remove poll()
    
    It's empty of all of the existing implementtions, so just remove it.

 retro-gtk/retro-controller.c           | 20 --------------------
 retro-gtk/retro-controller.h           |  2 --
 retro-gtk/retro-core-view-controller.c |  6 ------
 retro-gtk/retro-core.c                 | 11 -----------
 tests/retro-test-controller.c          |  6 ------
 5 files changed, 45 deletions(-)
---
diff --git a/retro-gtk/retro-controller.c b/retro-gtk/retro-controller.c
index 26364a1..0dba314 100644
--- a/retro-gtk/retro-controller.c
+++ b/retro-gtk/retro-controller.c
@@ -9,26 +9,6 @@ retro_controller_default_init (RetroControllerInterface *iface)
 {
 }
 
-/**
- * retro_controller_poll:
- * @self: a #RetroController
- *
- * Polls the pending input events for @self.
- */
-void
-retro_controller_poll (RetroController *self)
-{
-  RetroControllerInterface *iface;
-
-  g_return_if_fail (RETRO_IS_CONTROLLER (self));
-
-  iface = RETRO_CONTROLLER_GET_IFACE (self);
-
-  g_return_if_fail (iface->poll != NULL);
-
-  iface->poll (self);
-}
-
 /**
  * retro_controller_get_input_state:
  * @self: a #RetroController
diff --git a/retro-gtk/retro-controller.h b/retro-gtk/retro-controller.h
index eae1a5a..5688336 100644
--- a/retro-gtk/retro-controller.h
+++ b/retro-gtk/retro-controller.h
@@ -20,7 +20,6 @@ struct _RetroControllerInterface
 {
   GTypeInterface parent_iface;
 
-  void (*poll) (RetroController *self);
   gint16 (*get_input_state) (RetroController *self,
                              RetroInput      *input);
   RetroControllerType (*get_controller_type) (RetroController *self);
@@ -31,7 +30,6 @@ struct _RetroControllerInterface
                             guint16            strength);
 };
 
-void retro_controller_poll (RetroController *self);
 gint16 retro_controller_get_input_state (RetroController *self,
                                          RetroInput      *input);
 RetroControllerType retro_controller_get_controller_type (RetroController *self);
diff --git a/retro-gtk/retro-core-view-controller.c b/retro-gtk/retro-core-view-controller.c
index 8a5886f..37c5548 100644
--- a/retro-gtk/retro-core-view-controller.c
+++ b/retro-gtk/retro-core-view-controller.c
@@ -19,11 +19,6 @@ G_DEFINE_TYPE_WITH_CODE (RetroCoreViewController, retro_core_view_controller, G_
 
 /* Private */
 
-static void
-retro_core_view_controller_poll (RetroController *base)
-{
-}
-
 static gint16
 retro_core_view_controller_get_input_state (RetroController *base,
                                             RetroInput      *input)
@@ -119,7 +114,6 @@ retro_core_view_controller_init (RetroCoreViewController *self)
 static void
 retro_controller_interface_init (RetroControllerInterface *iface)
 {
-  iface->poll = retro_core_view_controller_poll;
   iface->get_input_state =  retro_core_view_controller_get_input_state;
   iface->get_controller_type = retro_core_view_controller_get_controller_type;
   iface->get_capabilities = retro_core_view_controller_get_capabilities;
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index b291421..a243595 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -1924,17 +1924,6 @@ retro_core_set_memory (RetroCore       *self,
 void
 retro_core_poll_controllers (RetroCore *self)
 {
-  RetroControllerIterator *iterator;
-  guint *port;
-  RetroController *controller;
-
-  g_return_if_fail (RETRO_IS_CORE (self));
-
-  iterator = retro_core_iterate_controllers (self);
-  while (retro_controller_iterator_next (iterator, &port, &controller))
-    if (controller != NULL)
-      retro_controller_poll (controller);
-  g_object_unref (iterator);
 }
 
 /**
diff --git a/tests/retro-test-controller.c b/tests/retro-test-controller.c
index 085f433..059cc17 100644
--- a/tests/retro-test-controller.c
+++ b/tests/retro-test-controller.c
@@ -39,11 +39,6 @@ G_DEFINE_TYPE_WITH_CODE (RetroTestController, retro_test_controller, G_TYPE_OBJE
 
 /* Private */
 
-static void
-retro_test_controller_poll (RetroController *base)
-{
-}
-
 static gint16
 retro_test_controller_get_input_state (RetroController *base,
                                        RetroInput      *input)
@@ -166,7 +161,6 @@ retro_test_controller_init (RetroTestController *self)
 static void
 retro_controller_interface_init (RetroControllerInterface *iface)
 {
-  iface->poll = retro_test_controller_poll;
   iface->get_input_state =  retro_test_controller_get_input_state;
   iface->get_controller_type = retro_test_controller_get_controller_type;
   iface->get_capabilities = retro_test_controller_get_capabilities;


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