Commit Graph

12 Commits

Author SHA1 Message Date
takase1121 3d0344393c src/renwindow: correctly free texture and renderer 2024-07-04 21:57:33 +08:00
Guldoman 290c7bc27f
Update font scale on monitor scale change for `RENDERER` backend (macOS) (#1650)
* Update font scale on monitor scale change for `RENDERER` backend (macOS)

* fix(renderer): check every font of a fontgroup for scale changes in `update_font_scale`

It is needed because fonts can be reused between groups and outside of them.
So if the first font of a group has already been scaled, we still need to check if the others still needs to be scaled.
2024-06-21 01:56:51 +02:00
Guldoman 8fd76d5d5c
Scale mouse coordinates by window scale (#1630)
* Update window scale on resize

* Scale mouse coordinates by window scale

* Avoid scaling mouse coordinates while using `LITE_USE_SDL_RENDERER`
2023-11-29 10:21:58 -05:00
Jan dfaa7be4cc
Attach command buffer to Renderer Window (#1472) 2023-06-16 16:19:52 +02:00
Guldoman 2cdf5d8949
Aggregate `SDL_Surface`s and their scale in `RenSurface` (#1429) 2023-03-19 15:39:52 -04:00
Guldoman 18720665d2
Use clipping functions provided by SDL (#1426) 2023-03-14 11:39:00 -04:00
adityaraj f9933ed621
Create Renderer Only When It Doesn't Exist (#1315) 2023-01-11 18:53:23 -05:00
Adam e784513222 Missing header. 2022-06-24 20:21:15 -04:00
jgmdev 83f368cdbe core: check for sdl initialization errors 2022-05-31 14:57:26 -04:00
Jan fff10a2612
Cleanup (#826)
* Update meson.build
- add logic to loop over more lua names (in the future more names might be discovered)
- disable warnings and errors on dependencies

* adding missing includes and checks, correct data types, pointer mess […]
- various functions from string.h were used but never defined
- logic was done across multiple different data types with different signedness, got all of them up to snuff
- give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit)
- add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything)
- correctly initialize structs with all data needed

All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true`

* remove undefined behavior, correct data types

* Comment manual bit manipulation to be investigated

* check for more edge cases, replace multiple cleanups with goto

* remove system specific includes
2022-04-15 11:34:46 -04:00
Francesco Abbate 4c99a18341 More accurate update rects / show window / present sequence
For the option when we use the SDL_Renderer we change:

- the order of calls to SDL_DestroyTexture/Renderer.
  Reported by valgrind on linux as an error to destroy the
  renderer before the texture.
- the SDL_Renderer and texture are created when the surface is
  initialized before the window is shown

It seems that creating the SDL_Renderer and Texture between the
moment the window was shown and the renderer present was introducing
a flashing blank window because of the time taken to create the
renderer/texture resources.
2021-05-06 09:00:36 +02:00
Francesco Abbate 3d84fe5488 Make usage of SDL renderer optional 2021-04-29 14:15:24 +02:00