Commit Graph

15 Commits

Author SHA1 Message Date
Ano-sys 9dc32c854b + made function that are not designed to be shared static
- removed obsolete window_size_delta struct and helper func
- marked on_wheel with attrib unused -> compiler would refuse compilation
2026-08-15 22:48:42 +02:00
Ano-sys 93e400304d - fixed typo
- removed SDL_GetWindowSurface from main, because the surface is not fixed and so not valid after resize -> forgoing check for availability is redundant
2026-08-15 22:42:23 +02:00
Ano-sys b315a55dae Added better error handling 2026-08-15 22:33:34 +02:00
Ano-sys b5361d8e21 Updated readme to be more clear which binary is ment for viewer flag in script 2026-08-15 19:06:59 +02:00
Ano-sys 2a360721b6 Updated README.md 2026-08-15 18:54:26 +02:00
Ano-sys 9297b4c062 + image struct stores pointer to images surface and texture now
+ replaced surface drawing via SDL_UpdateWindowSurface with SDL_Renderer calls -> much better ram usage since before, because SDL_Texture is used to store the drawn image instead the surface itself
2026-08-15 18:22:04 +02:00
Ano-sys 3487bdfb1f added right mouse button drag to move image on surface 2026-08-15 18:01:33 +02:00
Ano-sys a395470d88 + image scaling on mouse scroll
+ window resize redraws surface
+ moved window loop into own function
- removed on_wheel call to resize window for now -> hyprland is not handling this
+ image is not initially drawn onto displayed surface anymore, a subsurface is used (image_surface) to allow scaling on the real surface without redrawing the image in buffer.
+ renamed free_image to free_image_buffer to be more clear about the functionallity
+ renamed draw_image to create_image_surface
+ draw_image is a new function which draws the image_surface with linear scale onto the windows surface
2026-08-15 17:44:43 +02:00
Ano-sys 176f33f6de removed -o3 because it results in undefined behavior 2026-08-15 17:36:33 +02:00
Ano-sys 9986fafa80 Added script for Hyprland integration and updated README.md 2026-05-30 14:02:44 +02:00
ti_mo 2541f26dda buggy, but better, mouse zoom works most of the time, a strange bug occures when x and y are near zero, sdl then takes no mouse events anymore 2026-05-29 16:37:06 +02:00
Ano-sys 847a445a79 wayland ignores window size requests -> test on macos 2026-05-29 16:07:48 +02:00
Ano-sys 469966661c fixed typo 2026-05-29 11:11:52 +02:00
ti_mo 77b409a8cb updated README.md 2026-05-29 11:10:54 +02:00
ti_mo b78359dc02 initial push 2026-05-29 03:37:25 +02:00