Removed switching between screenshots & xcb_errors
This commit is contained in:
parent
acbf1bce14
commit
ce2d129c9b
|
@ -3,8 +3,10 @@ LDFLAGS := -lm `pkg-config --libs raylib xcb xcb-composite`
|
|||
|
||||
OBJECTS = ./screenshot.o ./windowtree.o
|
||||
|
||||
all: scrall
|
||||
|
||||
scrall: $(OBJECTS) main.c
|
||||
$(CC) $(CFLAGS) main.c $(LDFLAGS) -o scrall $(OBJECTS)
|
||||
$(CC) $(CFLAGS) main.c $(OBJECTS) $(LDFLAGS) -o scrall
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $^ -o $@
|
||||
|
|
|
@ -26,6 +26,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
Font font = LoadFontEx("/usr/share/fonts/Unifont/Unifont.ttf", 16, 0, 8192);
|
||||
|
||||
SetTargetFPS(30);
|
||||
|
||||
struct window_display {
|
||||
Vector2 offset;
|
||||
|
@ -47,12 +48,12 @@ int main(int argc, char **argv) {
|
|||
|
||||
for (int frame = 0; !WindowShouldClose(); frame++) {
|
||||
BeginDrawing();
|
||||
ClearBackground(Fade(BLACK, 0.9));
|
||||
ClearBackground(BLACK);
|
||||
|
||||
BeginBlendMode(BLEND_ALPHA);
|
||||
|
||||
for (size_t i = 0; i < n_windows; i++) {
|
||||
if (windows_snaps[i].texture.id != (unsigned int)-1 && ((frame / 10) % n_windows) == i) {
|
||||
if (windows_snaps[i].texture.id != (unsigned int)-1) {
|
||||
DrawTextureV(windows_snaps[i].texture, windows_snaps[i].offset, WHITE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <xcb/xcb_errors.h>
|
||||
|
||||
Image get_screenshot(xcb_connection_t *conn, xcb_window_t wid) {
|
||||
xcb_generic_error_t *err = NULL;
|
||||
|
|
Loading…
Reference in New Issue