summaryrefslogtreecommitdiff
path: root/live.c
diff options
context:
space:
mode:
authorNicolas Schodet2019-11-10 13:53:08 +0100
committerNicolas Schodet2019-11-14 00:41:59 +0100
commit1bdf71f47e5f9f75308c5fef664814c2c125f305 (patch)
treeb60fa6352cff7864d0474c24dab049d000818216 /live.c
parent4832457478133cd9610a17070b07d1abbdd45443 (diff)
Rework device API, drop raw output
Diffstat (limited to 'live.c')
-rw-r--r--live.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/live.c b/live.c
index c473b58..9bb52be 100644
--- a/live.c
+++ b/live.c
@@ -312,9 +312,9 @@ live_run(struct device *device, struct options *options)
}
if (exit)
break;
- const uint32_t *pixels = device_read(device);
- if (pixels) {
- SDL_UpdateTexture(texture, NULL, pixels, options->width * 4);
+ const struct device_image *image = device_read(device);
+ if (image) {
+ SDL_UpdateTexture(texture, NULL, image->pixels, image->stride);
SDL_SetRenderDrawColor(live.renderer, 0, 0, 0, 0);
SDL_RenderClear(live.renderer);
SDL_RenderCopyEx(live.renderer, texture, NULL,