[retro-gtk/const-pixels] framebuffer: Make retro_framebuffer_get_pixels() return const data
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/const-pixels] framebuffer: Make retro_framebuffer_get_pixels() return const data
- Date: Sat, 22 Feb 2020 16:13:25 +0000 (UTC)
commit 425a61895986ac1a3356ab67c9784954ed4325f4
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Feb 22 17:12:06 2020 +0100
framebuffer: Make retro_framebuffer_get_pixels() return const data
It shouldn't be modified and it's already used in a const way.
retro-gtk/retro-core.c | 2 +-
shared/retro-framebuffer-private.h | 2 +-
shared/retro-framebuffer.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 610f6e9..8a9cce6 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -922,7 +922,7 @@ video_output_cb (IpcRunner *runner,
gsize rowstride;
guint width, height;
gdouble aspect_ratio;
- gpointer pixels;
+ gconstpointer pixels;
retro_framebuffer_lock (self->framebuffer);
diff --git a/shared/retro-framebuffer-private.h b/shared/retro-framebuffer-private.h
index a3aaed9..5f5dcb0 100644
--- a/shared/retro-framebuffer-private.h
+++ b/shared/retro-framebuffer-private.h
@@ -40,7 +40,7 @@ gsize retro_framebuffer_get_rowstride (RetroFramebuffer *self);
guint retro_framebuffer_get_width (RetroFramebuffer *self);
guint retro_framebuffer_get_height (RetroFramebuffer *self);
gdouble retro_framebuffer_get_aspect_ratio (RetroFramebuffer *self);
-gpointer retro_framebuffer_get_pixels (RetroFramebuffer *self);
+gconstpointer retro_framebuffer_get_pixels (RetroFramebuffer *self);
#endif
diff --git a/shared/retro-framebuffer.c b/shared/retro-framebuffer.c
index 094f238..3deaf95 100644
--- a/shared/retro-framebuffer.c
+++ b/shared/retro-framebuffer.c
@@ -282,7 +282,7 @@ retro_framebuffer_get_aspect_ratio (RetroFramebuffer *self)
return self->metadata->aspect_ratio;
}
-gpointer
+gconstpointer
retro_framebuffer_get_pixels (RetroFramebuffer *self)
{
gsize size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]