From 918527e3fb9ddbdab0d2d1a400bfde311264ff0a Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Mon, 6 Jan 2025 07:33:25 -0500 Subject: update --- libwinnie/src/gfx.cc | 18 +++++++++++++++--- libwinnie/src/sdl/gfx.cc | 10 ---------- libwinnie/src/sdl/gfx.h | 4 ---- libwinnie/src/wm.cc | 2 -- 4 files changed, 15 insertions(+), 19 deletions(-) (limited to 'libwinnie/src') diff --git a/libwinnie/src/gfx.cc b/libwinnie/src/gfx.cc index 0ecf8ed..5aad1b8 100644 --- a/libwinnie/src/gfx.cc +++ b/libwinnie/src/gfx.cc @@ -18,8 +18,8 @@ along with this program. If not, see . Author: Eleni Maria Stea */ -#include #include +#include #include #include @@ -265,6 +265,18 @@ draw_line(Pixmap *pixmap, int x0, int y0, int x1, int y1, int r, int g, int b) } } +static inline int +min(int x, int y) +{ + return x < y ? x : y; +} + +static inline int +max(int x, int y) +{ + return x > y ? x : y; +} + void draw_polygon( Pixmap *pixmap, int *vpos, int *vtex, int num_verts, int r, int g, int b) @@ -305,8 +317,8 @@ draw_polygon( } } - ystart = std::min(ystart, std::min(y0, y1)); - yend = std::max(yend, std::max(y0, y1)); + ystart = min(ystart, min(y0, y1)); + yend = max(yend, max(y0, y1)); } if (ystart < 0) diff --git a/libwinnie/src/sdl/gfx.cc b/libwinnie/src/sdl/gfx.cc index 644c9d4..bab4e7b 100644 --- a/libwinnie/src/sdl/gfx.cc +++ b/libwinnie/src/sdl/gfx.cc @@ -129,11 +129,6 @@ get_clipping_rect() return gfx->clipping_rect; } -void -set_cursor_visibility(bool visible) -{ -} - void gfx_update(const Rect &upd_rect) { @@ -160,11 +155,6 @@ gfx_update(const Rect &upd_rect) SDL_UpdateRect(fbsurf, rect.x, rect.y, rect.width, rect.height); } -void -wait_vsync() -{ -} - void get_rgb_order(int *r, int *g, int *b) { diff --git a/libwinnie/src/sdl/gfx.h b/libwinnie/src/sdl/gfx.h index 36e7e36..b0dfa2e 100644 --- a/libwinnie/src/sdl/gfx.h +++ b/libwinnie/src/sdl/gfx.h @@ -36,12 +36,8 @@ int get_color_depth(); void set_clipping_rect(const Rect &clip_rect); const Rect &get_clipping_rect(); -void set_cursor_visibility(bool visible); - void gfx_update(const Rect &rect); -void wait_vsync(); // vertical synchronization - void get_rgb_order(int *r, int *g, int *b); #endif // GFX_H_ diff --git a/libwinnie/src/wm.cc b/libwinnie/src/wm.cc index 25a7e43..b4983e7 100644 --- a/libwinnie/src/wm.cc +++ b/libwinnie/src/wm.cc @@ -171,8 +171,6 @@ WindowManager::process_windows() } dirty_rects.clear(); - wait_vsync(); - if (!background) { fill_rect(uni, bg_color[0], bg_color[1], bg_color[2]); } else { -- cgit v1.2.3