[retro-gtk] core: Unsets the "variable updated" flag at the intended time
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core: Unsets the "variable updated" flag at the intended time
- Date: Sun, 1 Aug 2021 10:30:24 +0000 (UTC)
commit 129a4105d6a2a530c20cc62aa4f75079f495cf28
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Aug 1 13:07:05 2021 +0200
core: Unsets the "variable updated" flag at the intended time
This unsets the flag stating some variable got updated when getting
the new values and not when checking the flag, as stated in the
documentation of RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE.
retro-runner/retro-core.c | 7 +------
retro-runner/retro-environment.c | 3 +++
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/retro-runner/retro-core.c b/retro-runner/retro-core.c
index 3d3f563..6d95283 100644
--- a/retro-runner/retro-core.c
+++ b/retro-runner/retro-core.c
@@ -980,12 +980,7 @@ retro_core_get_variable_update (RetroCore *self)
{
g_return_val_if_fail (RETRO_IS_CORE (self), FALSE);
- if (!self->variable_updated)
- return FALSE;
-
- self->variable_updated = FALSE;
-
- return TRUE;
+ return self->variable_updated;
}
gdouble
diff --git a/retro-runner/retro-environment.c b/retro-runner/retro-environment.c
index 9a78b76..fb65cad 100644
--- a/retro-runner/retro-environment.c
+++ b/retro-runner/retro-environment.c
@@ -428,6 +428,9 @@ get_variable (RetroCore *self,
gchar *value;
g_assert (self);
+
+ self->variable_updated = FALSE;
+
g_return_val_if_fail (variable, FALSE);
value = g_hash_table_lookup (self->variables, variable->key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]